add httparty option config

This commit is contained in:
r888888888
2017-07-12 15:52:09 -07:00
parent 7f4d3052b3
commit 97ce9cafac
17 changed files with 22 additions and 22 deletions

View File

@@ -3,7 +3,7 @@ class TumblrApiClient < Struct.new(:api_key)
base_uri "https://api.tumblr.com/v2/blog/"
def posts(blog_name, post_id)
response = self.class.get("/#{blog_name}/posts", query: { id: post_id, api_key: api_key })
response = self.class.get("/#{blog_name}/posts", Danbooru.config.httparty_options.merge(query: { id: post_id, api_key: api_key }))
response.parsed_response.with_indifferent_access[:response]
end
end