Class: JIRA::JIRAService

Inherits:
Handsoap::Service
  • Object
show all
Includes:
RemoteAPI
Defined in:
lib/jiraSOAP/JIRAservice.rb

Constant Summary

Constants included from RemoteAPI

RemoteAPI::RESPONSE_XPATH

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from RemoteAPI

#create_issue_with_issue, #get_custom_fields, #get_issue_types, #get_issues_from_jql_search, #get_notification_schemes, #get_priorities, #get_project_avatar_for_key, #get_project_with_key, #get_resolutions, #get_statuses, #get_user_with_name, #get_versions_for_project, #login, #logout, #update_issue

Constructor Details

#initialize(endpoint_url) ⇒ JIRAService

Returns a new instance of JIRAService.



13
14
15
16
17
18
19
20
21
22
# File 'lib/jiraSOAP/JIRAservice.rb', line 13

def initialize(endpoint_url)
  super

  @endpoint_url = endpoint_url
  endpoint_data = {
    :uri => "#{endpoint_url}/rpc/soap/jirasoapservice-v2",
    :version => 2
  }
  self.class.endpoint endpoint_data
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object

PONDER: a finalizer that will try to logout



26
27
28
# File 'lib/jiraSOAP/JIRAservice.rb', line 26

def method_missing(method, *args)
  $stderr.puts "#{method} is not a defined method in the API...yet"
end

Instance Attribute Details

#auth_tokenObject (readonly)

Returns the value of attribute auth_token.



5
6
7
# File 'lib/jiraSOAP/JIRAservice.rb', line 5

def auth_token
  @auth_token
end

#userObject (readonly)

Returns the value of attribute user.



5
6
7
# File 'lib/jiraSOAP/JIRAservice.rb', line 5

def user
  @user
end

Class Method Details

.instance_at_url(url, user, password) ⇒ Object



7
8
9
10
11
# File 'lib/jiraSOAP/JIRAservice.rb', line 7

def self.instance_at_url(url, user, password)
  jira = JIRAService.new url
  jira. user, password
  jira
end