The VHX API is currently Private Beta. You can request an API key by emailing api@vhx.tv.
gem install vhx-ruby
$ 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'
rspec .
gem push vhx-ruby-#.#.#.gem
Full API reference is available at http://dev.vhx.tv/docs/api?ruby.
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
customers
authorizations
videos
collections
analytics