class TicketAbstractorClient::Jira::Client

Public Class Methods

new(endpoint = 'tp') click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 6
def initialize(endpoint = 'tp')
  super()
  @jira_endpoint = endpoint
end

Public Instance Methods

create_attachment(attachment) click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 11
def create_attachment(attachment)
  args, params = build_attachment_params(attachment)
  post(__method__, args, params)
end
create_comment(comment) click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 16
def create_comment(comment)
  post(__method__, build_comment_params(comment))
end
create_ticket(ticket) click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 20
def create_ticket(ticket)
  post(__method__, build_ticket_params(ticket))
end
endpoints() click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 24
def endpoints
  get(__method__)
end
get_all_fields() click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 28
def get_all_fields
  get(__method__)
end
get_attachment(opts) click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 32
def get_attachment(opts)
  get(__method__, opts)
end
get_comments(opts) click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 36
def get_comments(opts)
  get(__method__, opts)
end
get_fields_by_project(opts) click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 40
def get_fields_by_project(opts)
  get(__method__, opts)
end
get_ticket_by_id(opts) click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 44
def get_ticket_by_id(opts)
  get(__method__, opts)
end
get_ticket_status(opts) click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 48
def get_ticket_status(opts)
  get(__method__, build_status_params(opts))
end
get_tickets_by_jql(opts) click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 52
def get_tickets_by_jql(opts)
  get(__method__, opts)
end
get_tickets_statuses(opts) click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 56
def get_tickets_statuses(opts)
  get(__method__, opts)
end
transit_ticket(ticket) click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 64
def transit_ticket(ticket)
  post(__method__, build_transitions_params(ticket))
end
transitions_list(ticket_id) click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 68
def transitions_list(ticket_id)
  get(__method__, { ticket_id: ticket_id })
end
update_ticket(ticket) click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 60
def update_ticket(ticket)
  post(__method__, build_ticket_params(ticket))
end

Protected Instance Methods

get(path, args = {}, params = {}) click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 74
def get(path, args = {}, params = {})
  super("jira/#{path}", args, params.merge(jira_endpoint: @jira_endpoint))
end
post(path, args = {}, params = {}) click to toggle source
# File lib/ticket_abstractor_client/jira/client.rb, line 78
def post(path, args = {}, params = {})
  super("jira/#{path}", args, params.merge(jira_endpoint: @jira_endpoint))
end