Module: Allocine

Defined in:
lib/allocine.rb,
lib/allocine/web.rb,
lib/allocine/show.rb,
lib/allocine/movie.rb,
lib/allocine/web/curb.rb,
lib/allocine/web/open_uri.rb

Defined Under Namespace

Modules: WebCurb, WebOpenUri Classes: Movie, Show, Web

Constant Summary collapse

MOVIE_SEARCH_URL =
"http://www.allocine.fr/recherche/1/?q=%s"
MOVIE_DETAIL_URL =
"http://www.allocine.fr/film/fichefilm_gen_cfilm=%s.html"
SHOW_SEARCH_URL =
"http://www.allocine.fr/recherche/6/?q=%s"
SHOW_DETAIL_URL =
"http://www.allocine.fr/series/ficheserie_gen_cserie=%s.html"

Class Method Summary collapse

Class Method Details

.find_movie(search) ⇒ Object

Make a search on movies



27
28
29
# File 'lib/allocine.rb', line 27

def self.find_movie(search)
  Allocine::Movie.find(search)
end

.find_show(search) ⇒ Object

Make a search on shows



32
33
34
# File 'lib/allocine.rb', line 32

def self.find_show(search)
  Allocine::Show.find(search)
end

.lucky_movie(search) ⇒ Object

Returns the first result



37
38
39
# File 'lib/allocine.rb', line 37

def self.lucky_movie(search)
  Allocine::Movie.lucky_find(search)
end

.lucky_show(search) ⇒ Object



41
42
43
# File 'lib/allocine.rb', line 41

def self.lucky_show(search)
  Allocine::Show.lucky_find(search)
end