pawoo: fetch tags and commentary.
This commit is contained in:
@@ -47,6 +47,17 @@ class PawooApiClient
|
|||||||
def image_urls
|
def image_urls
|
||||||
json["media_attachments"].map {|x| x["url"]}
|
json["media_attachments"].map {|x| x["url"]}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def tags
|
||||||
|
json["tags"].map { |tag| [tag["name"], tag["url"]] }
|
||||||
|
end
|
||||||
|
|
||||||
|
def commentary
|
||||||
|
commentary = ""
|
||||||
|
commentary << "<p>#{json["spoiler_text"]}</p>" if json["spoiler_text"].present?
|
||||||
|
commentary << json["content"]
|
||||||
|
commentary
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_status(url)
|
def get_status(url)
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ module Sources::Strategies
|
|||||||
@profile_url = response.account_profile_url
|
@profile_url = response.account_profile_url
|
||||||
@image_url = response.image_urls.first
|
@image_url = response.image_urls.first
|
||||||
@image_urls = response.image_urls
|
@image_urls = response.image_urls
|
||||||
|
@tags = response.tags
|
||||||
|
@artist_commentary_title = nil
|
||||||
|
@artist_commentary_desc = response.commentary
|
||||||
end
|
end
|
||||||
|
|
||||||
def normalized_url
|
def normalized_url
|
||||||
|
|||||||
Reference in New Issue
Block a user