Class: Vimeo::Base
- Inherits:
-
Object
- Object
- Vimeo::Base
- Includes:
- HTTParty
- Defined in:
- lib/vimeo.rb,
lib/vimeo/base.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
- #upload(options) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/vimeo/base.rb', line 10 def initialize( = {}) @version = [:version] || "3.2" @access_token = [:access_token] @headers = { "Content-Type" => "application/json", "Accept" => "application/vnd.vimeo.*+json;version=#{@version}" } @headers["Authorization"] = "bearer #{@access_token}" if @access_token end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
8 9 10 |
# File 'lib/vimeo/base.rb', line 8 def access_token @access_token end |
#version ⇒ Object
Returns the value of attribute version.
8 9 10 |
# File 'lib/vimeo/base.rb', line 8 def version @version end |
Instance Method Details
#upload(options) ⇒ Object
8 9 10 |
# File 'lib/vimeo.rb', line 8 def upload() post('/me/videos', ) end |