Class: PixivApi::Response::Ugoira

Inherits:
Work show all
Defined in:
lib/pixiv_api/response/ugoira.rb

Instance Attribute Summary

Attributes inherited from Work

#age_limit, #book_style, #caption, #favorite_id, #height, #id, #is_linked, #is_manga, #metadata, #page_count, #publicity, #stats, #title, #tools, #type, #width

Attributes inherited from Identity

#id

Attributes inherited from PixivApi::Response

#attributes, #response

Instance Method Summary collapse

Methods inherited from Work

from_response, #pages

Methods inherited from Identity

#initialize

Methods inherited from PixivApi::Response

#[], attr_reader, define_attribute_method, define_attributes_method, define_blob_method, define_time_method, from_response, #initialize

Constructor Details

This class inherits a constructor from PixivApi::Response::Identity

Instance Method Details

#framesObject



4
5
6
# File 'lib/pixiv_api/response/ugoira.rb', line 4

def frames
  @attributes['metadata']['frames']
end

#zip_urlsObject



8
9
10
11
12
13
14
# File 'lib/pixiv_api/response/ugoira.rb', line 8

def zip_urls
  @attributes['metadata']['zip_urls'].map do |zip_urls, memo|
    zip_urls.each_with_object({}) do |(key, value), memo|
      memo[key] = blob_image_url(value)
    end
  end
end