Class: Kubrick::NetflixAPI

Inherits:
Object
  • Object
show all
Defined in:
lib/kubrick/netflix_api.rb

Direct Known Subclasses

Movie

Instance Method Summary collapse

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_helloObject



14
15
16
# File 'lib/kubrick/netflix_api.rb', line 14

def say_hello
  "Hello, Dave."
end

#wheres_johnnyObject



18
19
20
# File 'lib/kubrick/netflix_api.rb', line 18

def wheres_johnny
  "Here's Johnny!"
end