🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

fms-admin-api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fms-admin-api

0.3
Rubygems
Version published
Maintainers
1
Created
Source

Flash Media Server Administration API Build status

Command line interface to Flash Media Server Administration API:

Instalation

$ gem install fms-admin-api

Usage

$ fmsapi <method_name> --host=<fms host> [other params]

Just pick a method from the documentation and replace convention from camelCase to underscore_case (same for the parameters)

Example:

$ fmsapi reload_app --host=fms.example.com --auser=fms --apswd=secret --app_inst=live

Ruby client usage

You can use the ruby client directly on you code:

require 'fms'

client = FMS::Client.new(:host => 'fms.example.com',
                         :auser => 'fms',
                         :apswd => 'secret')  # you can use :port here, 1111 is default

now just call any method defined in the FMS Admin API:

client.reload_app(:app_inst => 'live/cam1')
client.get_apps(:force => true, :verbose => true)

just note that the methods name and parameters are used with ruby_default_notation instead of camelCase as documented.

The return value from all api method calls is a FMS::Response, on which you may want to call .to_xml to get a REXML::Document instance:

require 'rexml/xpath'

xml_resp = client.get_live_stream_stats(:app_inst => 'live', :stream => 'cam1').to_xml
puts REXML::XPath.first(xml_resp, '/result/data/publisher/name').text

there is also a to_s method on FMS::Response.

Take a look in the tests/ folder for more detailed specification.

FAQs

Package last updated on 07 Aug 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts