Refactor sources

This commit is contained in:
Albert Yi
2018-08-06 17:39:25 -07:00
parent 54363ffecf
commit 762dc3da24
71 changed files with 2340 additions and 2430 deletions

View File

@@ -12,6 +12,8 @@ class NicoSeigaApiClient
resp = HTTParty.get(uri, Danbooru.config.httparty_options)
if resp.success?
parse_illust_xml_response(resp.body)
else
raise HTTParty::ResponseError.new(resp)
end
end
@@ -20,6 +22,8 @@ class NicoSeigaApiClient
resp = HTTParty.get(uri, Danbooru.config.httparty_options)
if resp.success?
parse_artist_xml_response(resp.body)
else
raise HTTParty::ResponseError.new(resp)
end
end
@@ -34,6 +38,6 @@ class NicoSeigaApiClient
@image_id = image["id"].to_i
@user_id = image["user_id"].to_i
@title = image["title"]
@desc = image["description"]
@desc = image["description"] || image["summary"]
end
end