module Metacritic
Constants
- VERSION
Attributes
api_key[RW]
response[RW]
Public Class Methods
game(title)
click to toggle source
# File lib/metacritic.rb, line 50 def game(title) @game = Unirest.post "https://byroredux-metacritic.p.mashape.com/find/game", headers:{ "X-Mashape-Key" => api_key, "Content-Type" => "application/x-www-form-urlencoded", "Accept" => "application/json" }, parameters:{ "platform" => 1, "retry" => 4, "title" => title } Game.new(@game) end
movie(title)
click to toggle source
# File lib/metacritic.rb, line 17 def movie(title) @response = Unirest.post "https://byroredux-metacritic.p.mashape.com/find/movie", headers:{ "X-Mashape-Key" => api_key, "Content-Type" => "application/x-www-form-urlencoded", "Accept" => "application/json" }, parameters:{ "retry" => 4, "title" => title } Movie.new(@response) end
reviews(url)
click to toggle source
# File lib/metacritic.rb, line 46 def reviews(url) Reviews.new(url) end