module Constants
Public Class Methods
lang()
click to toggle source
# File lib/constants/constants.rb, line 96 def self.lang FilmAffinity.configuration.language.downcase end
query_params()
click to toggle source
# File lib/constants/constants.rb, line 2 def self.query_params { genre: 'genre=%s&', country: 'country=%s&', from_year: 'fromyear=%i&', to_year: 'toyear=%i&', no_doc: 'nodoc&', no_tv: 'notvse&' } end
tag(type)
click to toggle source
# File lib/constants/constants.rb, line 91 def self.tag(type) lang = FilmAffinity.configuration.language.to_sym Constants.tags[type][lang] end
urls()
click to toggle source
# File lib/constants/constants.rb, line 13 def self.urls { top: "https://www.filmaffinity.com/#{lang}/topgen.php%s", search_by_title: "https://www.filmaffinity.com/#{lang}/search.php?stext=%s&stype=title", movie: "https://www.filmaffinity.com/#{lang}/film%i.html" } end