Class: Jira::API

Inherits:
Object
  • Object
show all
Defined in:
lib/jira/api.rb

Constant Summary collapse

TYPES =
[
  :rest,
  :agile
].freeze
ENDPOINTS =
{
  rest:  'rest/api/2',
  agile: 'rest/greenhopper/latest'
}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ API

Initialize Jira::API

Parameters:

  • type (Symbol)


19
20
21
22
23
24
25
# File 'lib/jira/api.rb', line 19

def initialize(type)
  @type = type
  @client = Faraday.new
  @client.basic_auth(Jira::Core.username, Jira::Core.password)

  self.define_actions
end