module Feedlr::Gateway::Markers

Markers API

@see developer.feedly.com/v3/markers/

Public Instance Methods

lastest_tagged_entries(options = {}) click to toggle source

Get the latest tagged entry ids

@see developer.feedly.com/v3/markers/#get-the-latest-tagged-entry-ids @param options [Hash] @option options [String] :newerThan timestamp in ms. Default is 30 days. @return [Feedlr::Base]

# File lib/feedlr/gateway/markers.rb, line 190
def lastest_tagged_entries(options = {})
  build_object(:get , '/markers/tags' , options)
end
mark_article_as_read(article_id) click to toggle source

Mark an articles as read

@see mark_articles_as_read @param article_id [String] @return [Feedlr::Success]

# 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) click to toggle source

Keep an article as unread

@see mark_articles_as_unread @param article_id [String] @return [Feedlr::Success]

# 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) click to toggle source

Mark multiple articles as read

@see developer.feedly.com/v3/markers/#mark-one-or-multiple-articles-as-read @param articles_ids [Array] @return [Feedlr::Success]

# 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) click to toggle source

Keep multiple articles as unread

@see developer.feedly.com/v3/markers/#mark-one-or-multiple-articles-as-read @param articles_ids [Array] @return [Feedlr::Success]

# 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) click to toggle source

Mark categories as read

@see developer.feedly.com/v3/markers/#mark-a-category-as-read @param categories_ids [Array] @param options [Hash] @option options [String] :lastReadEntryId @option options [String] :asOf timestamp @return [Feedlr::Success]

# File lib/feedlr/gateway/markers.rb, line 116
def mark_categories_as_read(categories_ids, options)
  fail(ArgumentError) unless options[:lastReadEntryId] || options[:asOf]

  opts =  {
    categoryIds: categories_ids ,
    action: 'markAsRead' ,
    type: 'categories'
  }
  opts[:lastReadEntryId] =
    options[:lastReadEntryId] if options[:lastReadEntryId]
  opts[:asOf] = options[:asOf] if options[:asOf]
  build_object(:post , '/markers' , opts)
end
mark_category_as_read(category_id , options) click to toggle source

Mark a category as read

@see mark_categories_as_read @param category_id [String] @param options [Hash] @return [Feedlr::Success]

# File lib/feedlr/gateway/markers.rb, line 104
def mark_category_as_read(category_id , options)
  mark_categories_as_read([category_id] , options)
end
mark_feed_as_read(feed_id , options) click to toggle source

Mark feeds as read

@see mark_feeds_as_read @param feed_id [String] @param options [Hash] @return [Feedlr::Success]

# File lib/feedlr/gateway/markers.rb, line 72
def mark_feed_as_read(feed_id , options)
  mark_feeds_as_read([feed_id] , options)
end
mark_feeds_as_read(feeds_ids, options) click to toggle source

Mark feeds as read

@see developer.feedly.com/v3/markers/#mark-a-feed-as-read @param feeds_ids [Array] @param options [Hash] @option options [String] :lastReadEntryId @option options [String] :asOf timestamp @return [Feedlr::Success]

# File lib/feedlr/gateway/markers.rb, line 84
def mark_feeds_as_read(feeds_ids, options)
  fail(ArgumentError) unless options[:lastReadEntryId] || options[:asOf]

  opts =  {
    feedIds: feeds_ids ,
    action: 'markAsRead' ,
    type: 'feeds'
  }
  opts[:lastReadEntryId] =
    options[:lastReadEntryId] if options[:lastReadEntryId]
  opts[:asOf] = options[:asOf] if options[:asOf]
  build_object(:post , '/markers' , opts)
end
sync_read_counts(options = {}) click to toggle source

Get the latest read operations (to sync local cache)

@see developer.feedly.com/v3/markers/#get-the-latest-read-operations-to-sync-local-cache @param options [Hash] @option options [String] :newerThan timestamp in ms. Default is 30 days. @return [Feedlr::Base]

# File lib/feedlr/gateway/markers.rb, line 180
def sync_read_counts(options = {})
  build_object(:get , '/markers/reads' , options)
end
undo_mark_categories_as_read(categories_ids) click to toggle source

Undo mark categories as read

@see developer.feedly.com/v3/markers/#undo-mark-as-read @param categories_ids [Array] @return [Feedlr::Success]

# 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) click to toggle source

Undo Mark a category as read

@see undo_mark_categories_as_read @param category_id [String] @return [Feedlr::Success]

# 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) click to toggle source

Undo mark a feed as read

@see undo_mark_feeds_as_read @param feed_id [String] @return [Feedlr::Success]

# 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) click to toggle source

Undo mark feeds as read

@see developer.feedly.com/v3/markers/#undo-mark-as-read @param feeds_ids [Array] @return [Feedlr::Success]

# 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 = {}) click to toggle source

Get the list of unread counts

@see developer.feedly.com/v3/markers/#get-the-list-of-unread-counts @param options [Hash] @option options [String] :autorefresh let’s the server know

if this is a background auto-refresh or not

@option options [String] :newerThan timestamp in ms. Default is 30 days. @option options [String] :streamId A user or system category

can be passed to restrict the unread count response
to feeds in this category

@return [Feedlr::Base]

# File lib/feedlr/gateway/markers.rb, line 18
def user_unread_counts(options = {})
  build_object(:get , '/markers/counts' , options)
end