diff --git a/app/logical/pawoo_api_client.rb b/app/logical/pawoo_api_client.rb index 1fb90c127..ad7526fce 100644 --- a/app/logical/pawoo_api_client.rb +++ b/app/logical/pawoo_api_client.rb @@ -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 << "
#{json["spoiler_text"]}
" if json["spoiler_text"].present? + commentary << json["content"] + commentary + end end def get_status(url) diff --git a/app/logical/sources/strategies/pawoo.rb b/app/logical/sources/strategies/pawoo.rb index 32972238b..33c478453 100644 --- a/app/logical/sources/strategies/pawoo.rb +++ b/app/logical/sources/strategies/pawoo.rb @@ -33,6 +33,9 @@ module Sources::Strategies @profile_url = response.account_profile_url @image_url = response.image_urls.first @image_urls = response.image_urls + @tags = response.tags + @artist_commentary_title = nil + @artist_commentary_desc = response.commentary end def normalized_url