Class: Kubrick::NetflixAPI
- Inherits:
-
Object
- Object
- Kubrick::NetflixAPI
- Defined in:
- lib/kubrick/netflix_api.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(oauth, oauth_consumer) ⇒ NetflixAPI
constructor
A new instance of NetflixAPI.
- #say_hello ⇒ Object
- #wheres_johnny ⇒ Object
Constructor Details
#initialize(oauth, oauth_consumer) ⇒ NetflixAPI
Returns a new instance of NetflixAPI.
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/kubrick/netflix_api.rb', line 3 def initialize(oauth, oauth_consumer) @oauth_consumer_key = oauth_consumer[:oauth_consumer_key] @oauth_consumer_secret = oauth_consumer[:oauth_consumer_secret] @oauth_token = oauth[:oauth_token] @user_id = oauth[:user_id] @oauth_token_secret = oauth[:oauth_token_secret] @conn = Faraday.new(:url => "http://#{NETFLIX_API_ROOT}") do |builder| builder.adapter :net_http end end |
Instance Method Details
#say_hello ⇒ Object
14 15 16 |
# File 'lib/kubrick/netflix_api.rb', line 14 def say_hello "Hello, Dave." end |
#wheres_johnny ⇒ Object
18 19 20 |
# File 'lib/kubrick/netflix_api.rb', line 18 def wheres_johnny "Here's Johnny!" end |