module Teamlab::CommunityBookmarks
Methods for working with community bookmarks
Public Instance Methods
add_bookmark(url, title, options = {})
click to toggle source
# File lib/teamlab/modules/community/community_bookmarks.rb, line 46 def add_bookmark(url, title, options = {}) @request.post(%w[bookmark], { url: url, title: title }.merge(options)) end
add_comment_to_bookmark(bookmark_id, content, options = {})
click to toggle source
# File lib/teamlab/modules/community/community_bookmarks.rb, line 50 def add_comment_to_bookmark(bookmark_id, content, options = {}) @request.post(['bookmark', bookmark_id.to_s, 'comment'], { content: content }.merge(options)) end
delete_bookmark(bookmark_id)
click to toggle source
@param bookmark_id [Intger] bookmark to delete @return [Teamlab::Response] result of delete
# File lib/teamlab/modules/community/community_bookmarks.rb, line 56 def delete_bookmark(bookmark_id) @request.delete(['bookmark', bookmark_id.to_s]) end
get_all_bookmarks()
click to toggle source
# File lib/teamlab/modules/community/community_bookmarks.rb, line 6 def get_all_bookmarks @request.get(%w[bookmark]) end
get_bookmark(id)
click to toggle source
# File lib/teamlab/modules/community/community_bookmarks.rb, line 14 def get_bookmark(id) @request.get(['bookmark', id.to_s]) end
get_bookmark_comments(bookmark_id)
click to toggle source
# File lib/teamlab/modules/community/community_bookmarks.rb, line 38 def get_bookmark_comments(bookmark_id) @request.get(['bookmark', bookmark_id.to_s, 'comment']) end
get_bookmarks_added_by_me()
click to toggle source
# File lib/teamlab/modules/community/community_bookmarks.rb, line 18 def get_bookmarks_added_by_me @request.get(%w[bookmark @self]) end
get_bookmarks_by_tag(tag)
click to toggle source
# File lib/teamlab/modules/community/community_bookmarks.rb, line 30 def get_bookmarks_by_tag(tag) @request.get(['bookmark', "bytag?tag=#{tag.to_s.gsub(' ', '%20')}"]) end
get_my_favourite_bookmarks()
click to toggle source
# File lib/teamlab/modules/community/community_bookmarks.rb, line 22 def get_my_favourite_bookmarks @request.get(%w[bookmark @favs]) end
get_recently_added_bookmarks()
click to toggle source
# File lib/teamlab/modules/community/community_bookmarks.rb, line 34 def get_recently_added_bookmarks @request.get(%w[bookmark top recent]) end
search_bookmarks(queue)
click to toggle source
# File lib/teamlab/modules/community/community_bookmarks.rb, line 42 def search_bookmarks(queue) @request.get(['bookmark', '@search', queue.to_s]) end