class JIRA::Resource::Webhook

Constants

REST_BASE_PATH

Public Class Methods

all(client, options = {}) click to toggle source
# File lib/jira/resource/webhook.rb, line 21
def self.all(client, options = {})
  response = client.get(collection_path(client))
  json = parse_json(response.body)
  json.map do |attrs|
    new(client, { attrs: attrs }.merge(options))
  end
end
collection_path(client, prefix = '/') click to toggle source
# File lib/jira/resource/webhook.rb, line 17
def self.collection_path(client, prefix = '/')
  full_url(client) + prefix + endpoint_name
end
endpoint_name() click to toggle source
# File lib/jira/resource/webhook.rb, line 9
def self.endpoint_name
  'webhook'
end
full_url(client) click to toggle source
# File lib/jira/resource/webhook.rb, line 13
def self.full_url(client)
  client.options[:context_path] + REST_BASE_PATH
end