Class: JIRA::JIRAService
- Inherits:
-
Handsoap::Service
- Object
- Handsoap::Service
- JIRA::JIRAService
- Includes:
- RemoteAPI, RemoteAPIAdditions
- Defined in:
- lib/jiraSOAP/jira_service.rb
Overview
HTTPS is not supported out of the box in this version.
Interface to the JIRA endpoint server.
Due to limitations in Handsoap::Service, there can only be one endpoint. You can have multiple instances of that one endpoint if you would like (different users); but if you try to set a differnt endpoint for a new instance you will end up messing up any other instances currently being used.
Instance Attribute Summary collapse
- #auth_token ⇒ String readonly
- #endpoint_url ⇒ String readonly
- #user ⇒ String readonly
Class Method Summary collapse
-
.endpoint_url ⇒ String
Expose endpoint URL.
-
.instance_with_endpoint(url, user, password) ⇒ JIRA::JIRAService
Initialize and log in.
Instance Method Summary collapse
-
#initialize(endpoint) ⇒ JIRAService
constructor
A new instance of JIRAService.
-
#on_create_document(doc) ⇒ Object
protected
Makes sure the correct namespace is set.
-
#on_response_document(doc) ⇒ Object
protected
Make sure that the required namespace is added.
Methods included from RemoteAPIAdditions
Methods included from RemoteAPI
#add_attachments_to_issue_with_key, #add_base64_encoded_attachments_to_issue_with_key, #add_comment_to_issue_with_key, #add_user_to_group, #add_version_to_project_with_key, #add_worklog_and_auto_adjust_remaining_estimate, #attachments_for_issue_with_key, #available_actions, #comment_with_id, #comments_for_issue_with_key, #components_for_project_with_key, #create_issue_with_issue, #create_project_role_with_role, #create_project_with_project, #create_user, #create_user_group, #custom_fields, #delete_project_avatar_with_id, #delete_project_role, #delete_project_with_key, #delete_user_group, #delete_user_with_name, #favourite_filters, #group_with_name, #issue_count_for_filter_with_id, #issue_types, #issue_types_for_project_with_id, #issue_with_id, #issue_with_key, #issues_from_filter_with_id, #issues_from_jql_search, #login, #logout, #notification_schemes, #permission_schemes, #permission_to_edit_comment?, #priorities, #progress_workflow_action, #project_avatar_for_key, #project_avatars_for_key, #project_including_schemes_with_id, #project_role_name_unique?, #project_role_with_id, #project_roles, #project_with_id, #project_with_key, #projects, #refresh_custom_fields, #release_state_for_version_for_project, #remove_user_from_group, #resolution_date_for_issue_with_id, #resolution_date_for_issue_with_key, #resolutions, #server_configuration, #server_info, #set_archive_state_for_version_for_project, #set_new_project_avatar_for_project_with_key, #set_project_avatar_for_project_with_key, #statuses, #subtask_issue_types, #subtask_issue_types_for_project_with_id, #update_comment, #update_issue, #update_project_role_with_role, #update_project_with_project, #user_with_name, #versions_for_project
Constructor Details
#initialize(endpoint) ⇒ JIRAService
Returns a new instance of JIRAService.
48 49 50 51 52 53 54 |
# File 'lib/jiraSOAP/jira_service.rb', line 48 def initialize endpoint @@endpoint_url = @endpoint_url = endpoint.to_s self.class.endpoint({ :uri => "#{endpoint_url}/rpc/soap/jirasoapservice-v2", :version => 2 }) end |
Instance Attribute Details
#auth_token ⇒ String (readonly)
16 17 18 |
# File 'lib/jiraSOAP/jira_service.rb', line 16 def auth_token @auth_token end |
#endpoint_url ⇒ String (readonly)
22 23 24 |
# File 'lib/jiraSOAP/jira_service.rb', line 22 def endpoint_url @endpoint_url end |
#user ⇒ String (readonly)
19 20 21 |
# File 'lib/jiraSOAP/jira_service.rb', line 19 def user @user end |
Class Method Details
.endpoint_url ⇒ String
Expose endpoint URL
29 30 31 |
# File 'lib/jiraSOAP/jira_service.rb', line 29 def endpoint_url @@endpoint_url end |
.instance_with_endpoint(url, user, password) ⇒ JIRA::JIRAService
Initialize and log in. Fancy.
41 42 43 44 45 |
# File 'lib/jiraSOAP/jira_service.rb', line 41 def self.instance_with_endpoint url, user, password jira = JIRA::JIRAService.new url jira.login user, password jira end |
Instance Method Details
#on_create_document(doc) ⇒ Object (protected)
Makes sure the correct namespace is set
61 62 63 |
# File 'lib/jiraSOAP/jira_service.rb', line 61 def on_create_document doc doc.alias 'soap', 'http://soap.rpc.jira.atlassian.com' end |
#on_response_document(doc) ⇒ Object (protected)
Make sure that the required namespace is added
67 68 69 |
# File 'lib/jiraSOAP/jira_service.rb', line 67 def on_response_document doc doc.add_namespace 'jir', @endpoint_url end |