Refactor sources
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user