pawoo: fetch tags and commentary.

This commit is contained in:
evazion
2017-06-10 23:58:27 -05:00
parent 1bfc0a7d8a
commit 6edb5a807b
2 changed files with 14 additions and 0 deletions

View File

@@ -47,6 +47,17 @@ class PawooApiClient
def image_urls
json["media_attachments"].map {|x| x["url"]}
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
def get_status(url)