module Feedlr::Gateway::Tags

Tags API

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

Public Instance Methods

change_tag_label(tag_id , new_value) click to toggle source

Change a tag label

@see developer.feedly.com/v3/tags/#change-a-tag-label @param tag_id [String] @param new_value [String] label’s new value @return [Feedlr::Success]

# File lib/feedlr/gateway/tags.rb, line 64
def change_tag_label(tag_id , new_value)
  build_object(:post , "/tags/#{CGI.escape(tag_id) }" , label: new_value)
end
delete_tag(tag_id) click to toggle source

Delete a tag

@see delete_tags @param tag_id [String] @return [Feedlr::Success]

# File lib/feedlr/gateway/tags.rb, line 73
def delete_tag(tag_id)
  delete_tags([tag_id])
end
delete_tags(tags_ids) click to toggle source

Delete tags

@see developer.feedly.com/v3/tags/#delete-tags @param tags_ids [Array] list of ids @return [Feedlr::Success]

# File lib/feedlr/gateway/tags.rb, line 82
def delete_tags(tags_ids)
  tags_query = tags_ids.map { |t| CGI.escape(t) }.join(',')
  build_object(:delete , "/tags/#{tags_query }")
end
tag_entries(entries_ids , tags_ids) click to toggle source

Tag multiple entries

@see developer.feedly.com/v3/tags/#tag-multiple-entries @param entries_ids [Array] list of entries ids @param tags_ids [Array] list of tags ids @return [Feedlr::Success]

# File lib/feedlr/gateway/tags.rb, line 31
def tag_entries(entries_ids , tags_ids)
  tags_query = tags_ids.map { |t| CGI.escape(t) }.join(',')
  build_object(:put , "/tags/#{tags_query}" , entryIds: entries_ids)
end
tag_entry(entry_id , tags_ids) click to toggle source

Tag an existing entry

@see tag_entries @param entry_id [String] @param tags_ids [Array] list of tags ids @return [Feedlr::Success]

# File lib/feedlr/gateway/tags.rb, line 21
def tag_entry(entry_id , tags_ids)
  tag_entries([entry_id] , tags_ids)
end
untag_entries(entries_ids , tags_ids) click to toggle source

Untag multiple entries

@see developer.feedly.com/v3/tags/#untag-multiple-entries @param entries_ids [Array] list of entries ids @param tags_ids [Array] list of tags ids @return [Feedlr::Success]

# File lib/feedlr/gateway/tags.rb, line 52
def untag_entries(entries_ids , tags_ids)
  tags_query = tags_ids.map { |t| CGI.escape(t) }.join(',')
  entries_query = entries_ids.map { |t| CGI.escape(t) }.join(',')
  build_object(:delete , "/tags/#{tags_query}/#{entries_query}")
end
untag_entry(entry_id , tags_ids) click to toggle source

Untag an existing entry

@see untag_entries @param entry_id [String] @param tags_ids [Array] list of tags ids @return [Feedlr::Success]

# File lib/feedlr/gateway/tags.rb, line 42
def untag_entry(entry_id , tags_ids)
  untag_entries([entry_id] , tags_ids)
end
user_tags() click to toggle source

Get the list of tags created by the user

@see developer.feedly.com/v3/tags/#get-the-list-of-tags-created-by-the-user @return [Feedlr::Collection]

# File lib/feedlr/gateway/tags.rb, line 11
def user_tags
  build_object(:get , '/tags')
end