0.01
No release in over 3 years
Low commit activity in last 3 years
Ruby client and command line interface to Flash Media Server Administration API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

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.