module BacklogKit::Client::Watching

Methods for the Watching API

Public Instance Methods

add_watching(issue_id_or_key, params = {}) click to toggle source

Add a watching

@param issue_id_or_key [Integer, String] Issue id or Issue key @param params [Hash] Request parameters @return [BacklogKit::Response] The watching information

# File lib/backlog_kit/client/watching.rb, line 36
def add_watching(issue_id_or_key, params = {})
  params[:issue_id_or_key] = issue_id_or_key
  post('watchings', params)
end
get_watching(watching_id) click to toggle source

Get a watching

@param watching_id [Integer, String] Watching id @return [BacklogKit::Response] The watching information

# File lib/backlog_kit/client/watching.rb, line 27
def get_watching(watching_id)
  get("watchings/#{watching_id}")
end
get_watching_count(user_id, params = {}) click to toggle source

Get number of watchings

@param user_id [Integer, String] User id @param params [Hash] Request parameters @return [BacklogKit::Response] Number of watchings

# File lib/backlog_kit/client/watching.rb, line 19
def get_watching_count(user_id, params = {})
  get("users/#{user_id}/watchings/count", params)
end
get_watchings(user_id, params = {}) click to toggle source

Get list of watchings

@param user_id [Integer, String] User id @param params [Hash] Request parameters @return [BacklogKit::Response] List of watchings

# File lib/backlog_kit/client/watching.rb, line 10
def get_watchings(user_id, params = {})
  get("users/#{user_id}/watchings", params)
end
mark_as_read_watching(watching_id) click to toggle source

Mark a watching as read

@param watching_id [Integer, String] Watching id @return [BacklogKit::Response] No content response

# File lib/backlog_kit/client/watching.rb, line 70
def mark_as_read_watching(watching_id)
  post("watchings/#{watching_id}/markAsRead")
end
mark_as_read_watchings(user_id) click to toggle source

Mark watchings as read

@param user_id [Integer, String] User id @return [BacklogKit::Response] No content response

# File lib/backlog_kit/client/watching.rb, line 62
def mark_as_read_watchings(user_id)
  post("users/#{user_id}/watchings/markAsChecked")
end
remove_watching(watching_id) click to toggle source

Remove a watching

@param watching_id [Integer, String] Watching id @return [BacklogKit::Response] The watching information

# File lib/backlog_kit/client/watching.rb, line 54
def remove_watching(watching_id)
  delete("watchings/#{watching_id}")
end
update_watching(watching_id, params = {}) click to toggle source

Update a watching

@param watching_id [Integer, String] Watching id @param params [Hash] Request parameters @return [BacklogKit::Response] The watching information

# File lib/backlog_kit/client/watching.rb, line 46
def update_watching(watching_id, params = {})
  patch("watchings/#{watching_id}", params)
end