Class: Pixiv::BookmarkList
- Inherits:
-
OwnedIllustList
- Object
- Page
- IllustList
- OwnedIllustList
- Pixiv::BookmarkList
- Defined in:
- lib/pixiv/bookmark_list.rb
Direct Known Subclasses
Constant Summary
Constants inherited from OwnedIllustList
OwnedIllustList::ILLUSTS_PER_PAGE
Instance Attribute Summary
Attributes inherited from OwnedIllustList
Attributes inherited from IllustList
Class Method Summary collapse
Instance Method Summary collapse
- #page_hashes ⇒ Array<Hash{Symbol=>Object}, nil>
- #total_count ⇒ Integer (also: #bookmarks_count)
Methods inherited from OwnedIllustList
#first?, #max_size, #next_url, #prev_url, #url
Methods inherited from IllustList
#doc, #illust_hashes, #page_class
Methods included from PageCollection
#first?, #last?, #next_attrs, #next_url, #page_class, #prev_attrs, #prev_url, #size
Methods inherited from Page
#bind, #doc, #fetched?, #force, #initialize, lazy_new
Constructor Details
This class inherits a constructor from Pixiv::Page
Class Method Details
.url(member_id, page = 1) ⇒ Object
4 5 6 |
# File 'lib/pixiv/bookmark_list.rb', line 4 def self.url(member_id, page = 1) "#{ROOT_URL}/bookmark.php?id=#{member_id}&rest=show&p=#{page}" end |
Instance Method Details
#page_hashes ⇒ Array<Hash{Symbol=>Object}, nil>
14 15 16 |
# File 'lib/pixiv/bookmark_list.rb', line 14 lazy_attr_reader(:page_hashes) { search!('li[id^="li_"]').map {|n| hash_from_list_item(n) } } |
#total_count ⇒ Integer Also known as: bookmarks_count
9 10 11 12 |
# File 'lib/pixiv/bookmark_list.rb', line 9 lazy_attr_reader(:total_count) { node = at!('a[href="/bookmark.php?type=illust_all"]') node.inner_text[/\d+/].to_i } |