Created
September 22, 2015 10:43
-
-
Save ahmetabdi/377eab068f726de58fdc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tmdb::Requester | |
def self.get(url, params = {} of Char => Char) | |
url = api.url_for(action, params) | |
HTTP::Client.get(url, headers: headers) | |
end | |
private def api | |
Igdb::Api.instance | |
end | |
private def headers | |
Hash.new.tap do |headers| | |
headers["Accept"] = "application/json" | |
headers["Content-Type"] = "application/json" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Returns: