Class: JIRA::JIRAService
- Inherits:
-
Handsoap::Service
- Object
- Handsoap::Service
- JIRA::JIRAService
- Includes:
- RemoteAPI
- Defined in:
- lib/jiraSOAP/JIRAservice.rb
Overview
consider adding a finalizer that will try to logout
Interface to the JIRA endpoint server; set at initialization.
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; 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.
It is best to treat this class as a singleton. There should only be one. However, this is not enforced, in case you want to be able to login as multiple users to the same endpoint.
HTTPS is not supported in this version.
Constant Summary
Constants included from RemoteAPI
Instance Attribute Summary collapse
-
#auth_token ⇒ Object
readonly
Returns the value of attribute auth_token.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Class Method Summary collapse
-
.instance_with_endpoint(url, user, password) ⇒ Object
Factory method to initialize and login.
Instance Method Summary collapse
-
#initialize(endpoint_url) ⇒ JIRAService
constructor
Slightly hacky in order to set the endpoint at the initialization.
-
#method_missing(method, *args) ⇒ Object
Something to help users out until the rest of the API is implemented.
Methods included from RemoteAPI
#add_base64_encoded_attachments_to_issue, #add_comment_to_issue, #add_version_to_project, #create_issue_with_issue, #create_project_with_project, #create_user, #delete_user_with_name, #get_attachments_for_issue_with_key, #get_comment_with_id, #get_comments_for_issue, #get_custom_fields, #get_favourite_filters, #get_issue_count_for_filter_with_id, #get_issue_types, #get_issue_types_for_project_with_id, #get_issue_with_id, #get_issue_with_key, #get_issues_from_filter_with_id, #get_issues_from_jql_search, #get_issues_from_text_search, #get_notification_schemes, #get_priorities, #get_project_avatar_for_key, #get_project_avatars_for_key, #get_project_including_schemes_by_id, #get_project_with_id, #get_project_with_key, #get_resolutions, #get_server_info, #get_statuses, #get_subtask_issue_types, #get_subtask_issue_types_for_project_with_id, #get_user_with_name, #get_versions_for_project, #login, #logout, #refresh_custom_fields, #release_version_for_project, #set_archive_state_for_version_for_project, #update_comment, #update_issue, #update_project_with_project
Constructor Details
#initialize(endpoint_url) ⇒ JIRAService
Slightly hacky in order to set the endpoint at the initialization.
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/jiraSOAP/JIRAservice.rb', line 35 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
Something to help users out until the rest of the API is implemented.
47 48 49 50 51 52 |
# File 'lib/jiraSOAP/JIRAservice.rb', line 47 def method_missing(method, *args) = 'Check the documentation; the method may not be implemented or ' << 'has changed in recent revisions. The client side API has not ' << 'been stabilized yet.' raise NoMethodError, , caller end |
Instance Attribute Details
#auth_token ⇒ Object (readonly)
Returns the value of attribute auth_token.
21 22 23 |
# File 'lib/jiraSOAP/JIRAservice.rb', line 21 def auth_token @auth_token end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
21 22 23 |
# File 'lib/jiraSOAP/JIRAservice.rb', line 21 def user @user end |
Class Method Details
.instance_with_endpoint(url, user, password) ⇒ Object
Factory method to initialize and login.
27 28 29 30 31 |
# File 'lib/jiraSOAP/JIRAservice.rb', line 27 def self.instance_with_endpoint(url, user, password) jira = JIRAService.new url jira.login user, password jira end |