WowzaRest
Ruby wrapper for Wowza Streaming Engine Rest API
Installation
Add this line to your application's Gemfile:
gem 'wowza_rest'
And then execute:
$ bundle
Or install it yourself as:
$ gem install wowza_rest
Usage
Create Client:
client = WowzaRest::Client.new(
host: 'WOWZA_ENGINE_IP_OR_URL',
port: 'PORT_NUMBER',
username: 'WOWZA_ENGINE_USERNAME',
password: 'WOWZA_ENGINE_PASSWORD'
)
Applications
- List All Applications
applications = client.applications
- Fetch single application
application = client.get_application('APPLICATION_NAME')
- Create a new application
client.create_application({
name: 'APPLICATION_NAME',
appType: 'LIVE|VOD'
})
- Update Application
client.update_application('APPLICATION_NAME', {
# ... configs to be updated
})
- Delete Application
client.delete_application('APPLICATION_NAME')
Instances
- List all instances for an application
client.instances('APPLICATION_NAME')
- Fetch single instance
client.get_instance('APPLICATION_NAME', 'INSTANCE_NAME')
# instance name can be ommited and defaults to the default instance
- Get a single incoming stream monitoring stats
client.get_incoming_stream_stat('APPLICATION_NAME', 'STREAM_NAME', 'INSTANCE_NAME')
# instance name can be ommited and defaults to the default instance
Publishers
- Create publisher (Wowza SE Source)
client.create_publisher('PUBLISHER_NAME', 'PUBLISHER_PASSWORD')
- Delete publisher (Wowza SE Source)
client.delete_publisher('PUBLISHER_NAME')
Server Status
client.server_status
SMILs
- List all SMILs
smils = client.smils
- Fetch SMIL
smil = client.get_smil('SMIL_NAME')
- Create SMIL
client.create_smil('SMIL_NAME', {
# ... smil body to be created
})
- Update SMIL
client.update_smil('SMIL_NAME', {
# ... smil body to be updated
})
- Delete SMIL
client.delete_smil('SMIL_NAME')
Development
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/ExtremeSolution/wowza-rest. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.