Project

stupeflix

0.01
No commit activity in last 3 years
No release in over 3 years
Stupeflix API wrapper using HTTParty
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

stupeflix

Stupeflix API (http://developer.stupeflix.com/) wrapper using HTTParty.

Installation

Add this line to your application's Gemfile:

gem 'stupeflix'

And then execute:

$ bundle

Or install it yourself as:

$ gem install stupeflix

Usage

Retrieve your API keys from http://developer.stupeflix.com/keychain/ and then replace the placeholder variables below.

# Set a unique identifier e.g. 'user/resource_id'
id = "user/resource_id#{Time.now.to_i}"

# Configure credentials
s = Stupeflix::Video.new id, YOUR_ACCESS_KEY, YOUR_SECRET_KEY

# To PUT a video definition
s.definition = definition_xml

# POST profiles to request videos be generated accordingly
s.profiles = profiles_xml

# GET status of requested videos
s.status

See the examples directory for guidance.

Follow this link for more information about how to produce a definition. I recommend Nokogiri's XML builder.

An example of profile XML:

<profiles><profile name="720p"><stupeflixStore></stupeflixStore></profile></profiles>

Follow this link for a list of supported profile types. Videos will be generated for each profile.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request