Class: Vinegar::Client

Inherits:
Object
  • Object
show all
Includes:
Authentication, Cast, Clip, Movie, Review, Root, Similar, Connection, Request
Defined in:
lib/vinegar/client.rb,
lib/vinegar/client/root.rb,
lib/vinegar/client/movie.rb,
lib/vinegar/client/movie/cast.rb,
lib/vinegar/client/movie/clip.rb,
lib/vinegar/client/movie/review.rb,
lib/vinegar/client/movie/similar.rb

Defined Under Namespace

Modules: Cast, Clip, Movie, Review, Root, Similar

Instance Method Summary collapse

Methods included from Clip

#clips_for_movie

Methods included from Similar

#similar_movies

Methods included from Cast

#full_movie_cast

Methods included from Review

#all_movie_reviews, #dvd_movie_reviews, #top_critic_movie_reviews

Methods included from Movie

#movie, #movies_search

Methods included from Root

#root

Methods included from Request

#get

Methods included from Connection

#connection

Methods included from Authentication

#authenticated?, #authentication, #login_token

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



17
18
19
20
21
22
23
24
25
26
# File 'lib/vinegar/client.rb', line 17

def initialize(options = {})
  Vinegar.reset!
  options = Vinegar.options.merge(options)

  Configuration::VALID_OPTIONS_KEYS.each do |key|
    send("#{key}=", options[key])
  end

  (options[:api_key])
end