Module: Feedlr::Gateway::Markers
- Included in:
- Client
- Defined in:
- lib/feedlr/gateway/markers.rb
Overview
Markers API
Instance Method Summary collapse
-
#lastest_tagged_entries(options = {}) ⇒ Feedlr::Base
Get the latest tagged entry ids.
-
#mark_article_as_read(article_id) ⇒ Feedlr::Success
Mark an articles as read.
-
#mark_article_as_unread(article_id) ⇒ Feedlr::Success
Keep an article as unread.
-
#mark_articles_as_read(articles_ids) ⇒ Feedlr::Success
Mark multiple articles as read.
-
#mark_articles_as_unread(articles_ids) ⇒ Feedlr::Success
Keep multiple articles as unread.
-
#mark_categories_as_read(categories_ids, options) ⇒ Feedlr::Success
Mark categories as read.
-
#mark_category_as_read(category_id, options) ⇒ Feedlr::Success
Mark a category as read.
-
#mark_feed_as_read(feed_id, options) ⇒ Feedlr::Success
Mark feeds as read.
-
#mark_feeds_as_read(feeds_ids, options) ⇒ Feedlr::Success
Mark feeds as read.
-
#sync_read_counts(options = {}) ⇒ Feedlr::Base
Get the latest read operations (to sync local cache).
-
#undo_mark_categories_as_read(categories_ids) ⇒ Feedlr::Success
Undo mark categories as read.
-
#undo_mark_category_as_read(category_id) ⇒ Feedlr::Success
Undo Mark a category as read.
-
#undo_mark_feed_as_read(feed_id) ⇒ Feedlr::Success
Undo mark a feed as read.
-
#undo_mark_feeds_as_read(feeds_ids) ⇒ Feedlr::Success
Undo mark feeds as read.
-
#user_unread_counts(options = {}) ⇒ Feedlr::Base
Get the list of unread counts.
Instance Method Details
#lastest_tagged_entries(options = {}) ⇒ Feedlr::Base
Get the latest tagged entry ids
190 191 192 |
# File 'lib/feedlr/gateway/markers.rb', line 190 def lastest_tagged_entries( = {}) build_object(:get , '/markers/tags' , ) end |
#mark_article_as_read(article_id) ⇒ Feedlr::Success
Mark an articles as read
27 28 29 |
# File 'lib/feedlr/gateway/markers.rb', line 27 def mark_article_as_read(article_id) mark_articles_as_read([article_id]) end |
#mark_article_as_unread(article_id) ⇒ Feedlr::Success
Keep an article as unread
49 50 51 |
# File 'lib/feedlr/gateway/markers.rb', line 49 def mark_article_as_unread(article_id) mark_articles_as_unread([article_id]) end |
#mark_articles_as_read(articles_ids) ⇒ Feedlr::Success
Mark multiple articles as read
36 37 38 39 40 41 42 |
# File 'lib/feedlr/gateway/markers.rb', line 36 def mark_articles_as_read(articles_ids) build_object(:post , '/markers' , entryIds: articles_ids , action: 'markAsRead' , type: 'entries' ) end |
#mark_articles_as_unread(articles_ids) ⇒ Feedlr::Success
Keep multiple articles as unread
58 59 60 61 62 63 64 |
# File 'lib/feedlr/gateway/markers.rb', line 58 def mark_articles_as_unread(articles_ids) build_object(:post , '/markers' , entryIds: articles_ids , action: 'keepUnread' , type: 'entries' ) end |
#mark_categories_as_read(categories_ids, options) ⇒ Feedlr::Success
Mark categories as read
116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/feedlr/gateway/markers.rb', line 116 def mark_categories_as_read(categories_ids, ) fail(ArgumentError) unless [:lastReadEntryId] || [:asOf] opts = { categoryIds: categories_ids , action: 'markAsRead' , type: 'categories' } opts[:lastReadEntryId] = [:lastReadEntryId] if [:lastReadEntryId] opts[:asOf] = [:asOf] if [:asOf] build_object(:post , '/markers' , opts) end |
#mark_category_as_read(category_id, options) ⇒ Feedlr::Success
Mark a category as read
104 105 106 |
# File 'lib/feedlr/gateway/markers.rb', line 104 def mark_category_as_read(category_id , ) mark_categories_as_read([category_id] , ) end |
#mark_feed_as_read(feed_id, options) ⇒ Feedlr::Success
Mark feeds as read
72 73 74 |
# File 'lib/feedlr/gateway/markers.rb', line 72 def mark_feed_as_read(feed_id , ) mark_feeds_as_read([feed_id] , ) end |
#mark_feeds_as_read(feeds_ids, options) ⇒ Feedlr::Success
Mark feeds as read
84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/feedlr/gateway/markers.rb', line 84 def mark_feeds_as_read(feeds_ids, ) fail(ArgumentError) unless [:lastReadEntryId] || [:asOf] opts = { feedIds: feeds_ids , action: 'markAsRead' , type: 'feeds' } opts[:lastReadEntryId] = [:lastReadEntryId] if [:lastReadEntryId] opts[:asOf] = [:asOf] if [:asOf] build_object(:post , '/markers' , opts) end |
#sync_read_counts(options = {}) ⇒ Feedlr::Base
Get the latest read operations (to sync local cache)
180 181 182 |
# File 'lib/feedlr/gateway/markers.rb', line 180 def sync_read_counts( = {}) build_object(:get , '/markers/reads' , ) end |
#undo_mark_categories_as_read(categories_ids) ⇒ Feedlr::Success
Undo mark categories as read
166 167 168 169 170 171 172 |
# File 'lib/feedlr/gateway/markers.rb', line 166 def undo_mark_categories_as_read(categories_ids) build_object(:post , '/markers', categoryIds: categories_ids, action: 'undoMarkAsRead', type: 'categories' ) end |
#undo_mark_category_as_read(category_id) ⇒ Feedlr::Success
Undo Mark a category as read
157 158 159 |
# File 'lib/feedlr/gateway/markers.rb', line 157 def undo_mark_category_as_read(category_id) undo_mark_categories_as_read([category_id]) end |
#undo_mark_feed_as_read(feed_id) ⇒ Feedlr::Success
Undo mark a feed as read
135 136 137 |
# File 'lib/feedlr/gateway/markers.rb', line 135 def undo_mark_feed_as_read(feed_id) undo_mark_feeds_as_read([feed_id]) end |
#undo_mark_feeds_as_read(feeds_ids) ⇒ Feedlr::Success
Undo mark feeds as read
144 145 146 147 148 149 150 |
# File 'lib/feedlr/gateway/markers.rb', line 144 def undo_mark_feeds_as_read(feeds_ids) build_object(:post , '/markers', feedIds: feeds_ids , action: 'undoMarkAsRead' , type: 'feeds' ) end |
#user_unread_counts(options = {}) ⇒ Feedlr::Base
Get the list of unread counts
18 19 20 |
# File 'lib/feedlr/gateway/markers.rb', line 18 def user_unread_counts( = {}) build_object(:get , '/markers/counts' , ) end |