# frozen_string_literal: true # This file was auto-generated by lib/tasks/web.rake module Slack module Web module Api module Endpoints module Bookmarks # # Add bookmark to a channel. # # @option options [string] :channel_id # Channel to add bookmark in. # @option options [string] :title # Title for the bookmark. # @option options [string] :type # Type of the bookmark i.e link. # @option options [string] :emoji # Emoji tag to apply to the link. # @option options [string] :entity_id # ID of the entity being bookmarked. Only applies to message and file types. # @option options [string] :link # Link to bookmark. # @option options [string] :parent_id # Id of this bookmark's parent. # @see https://api.slack.com/methods/bookmarks.add # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bookmarks/bookmarks.add.json def bookmarks_add(options = {}) throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil? throw ArgumentError.new('Required arguments :title missing') if options[:title].nil? throw ArgumentError.new('Required arguments :type missing') if options[:type].nil? post('bookmarks.add', options) end # # Edit bookmark. # # @option options [string] :bookmark_id # Bookmark to update. # @option options [string] :channel_id # Channel to update bookmark in. # @option options [string] :emoji # Emoji tag to apply to the link. # @option options [string] :link # Link to bookmark. # @option options [string] :title # Title for the bookmark. # @see https://api.slack.com/methods/bookmarks.edit # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bookmarks/bookmarks.edit.json def bookmarks_edit(options = {}) throw ArgumentError.new('Required arguments :bookmark_id missing') if options[:bookmark_id].nil? throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil? post('bookmarks.edit', options) end # # List bookmark for the channel. # # @option options [string] :channel_id # Channel to list bookmarks in. # @see https://api.slack.com/methods/bookmarks.list # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bookmarks/bookmarks.list.json def bookmarks_list(options = {}) throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil? post('bookmarks.list', options) end # # Remove bookmark from the channel. # # @option options [string] :bookmark_id # Bookmark to remove. # @option options [string] :channel_id # Channel to remove bookmark. # @see https://api.slack.com/methods/bookmarks.remove # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bookmarks/bookmarks.remove.json def bookmarks_remove(options = {}) throw ArgumentError.new('Required arguments :bookmark_id missing') if options[:bookmark_id].nil? throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil? post('bookmarks.remove', options) end end end end end end