Module: BacklogKit::Client::Watching

Included in:
BacklogKit::Client
Defined in:
lib/backlog_kit/client/watching.rb

Overview

Methods for the Watching API

Instance Method Summary collapse

Instance Method Details

#add_watching(issue_id_or_key, params = {}) ⇒ BacklogKit::Response

Add a watching



36
37
38
39
# 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) ⇒ BacklogKit::Response

Get a watching



27
28
29
# 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 = {}) ⇒ BacklogKit::Response

Get number of watchings



19
20
21
# 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 = {}) ⇒ BacklogKit::Response

Get list of watchings



10
11
12
# 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(user_id) ⇒ BacklogKit::Response

Mark watchings as read



62
63
64
# File 'lib/backlog_kit/client/watching.rb', line 62

def mark_as_read_watching(user_id)
  post("users/#{user_id}/watchings/markAsChecked")
end

#remove_watching(watching_id) ⇒ BacklogKit::Response

Remove a watching



54
55
56
# File 'lib/backlog_kit/client/watching.rb', line 54

def remove_watching(watching_id)
  delete("watchings/#{watching_id}")
end

#update_watching(watching_id, params = {}) ⇒ BacklogKit::Response

Update a watching



46
47
48
# File 'lib/backlog_kit/client/watching.rb', line 46

def update_watching(watching_id, params = {})
  patch("watchings/#{watching_id}", params)
end