VHX Ruby API Client
The VHX API is currently Private Beta. You can request an API key by emailing api@vhx.tv.
Installation
gem install vhx-ruby
Building Locally
$ gem build vhx.gemspec
Successfully built RubyGem
Name: vhx
Version: 0.0.0
File: vhx-0.0.0.gem
$ gem install vhx-0.0.0.gem
Successfully installed vhx-0.0.0
1 gem installed
$ irb
irb(main)> require 'vhx'
Running Specs
rspec .
Publishing to RubyGems
gem push vhx-ruby-#.#.#.gem
Documentation
Documentation is available at http://dev.vhx.tv/docs/api/ruby. Full API reference is available at http://dev.vhx.tv/docs/api?ruby.
Getting Started
Before requesting your first resource, you must setup an instance of the Vhx Client:
vhx = Vhx.setup({ api_key: 'your VHX API key' })
Here's an example of creating a Vhx resource with payload options. You can handle errors by rescuing Vhx::VhxError.
begin
# Example Customer Create
customer = Vhx::Customer.create({
email: 'customer@email.com',
name: 'First Last',
subscription: 'https://api.vhx.tv/subscriptions/1'
})
rescue Vhx::VhxError
# Handle error
end
Resources & methods
customers
authorizations
videos
collections
analytics