Class: SiteimproveAPIClient::IntegrationsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ IntegrationsApi

Returns a new instance of IntegrationsApi.



19
20
21
# File 'lib/siteimprove_api_client/api/integrations_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/siteimprove_api_client/api/integrations_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#integrations_get(opts = {}) ⇒ Integrations

Integrations to external systems Integrations to external systems, Like Jira

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



26
27
28
29
# File 'lib/siteimprove_api_client/api/integrations_api.rb', line 26

def integrations_get(opts = {})
  data, _status_code, _headers = integrations_get_with_http_info(opts)
  data
end

#integrations_get_with_http_info(opts = {}) ⇒ Array<(Integrations, Integer, Hash)>

Integrations to external systems Integrations to external systems, Like Jira

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Integrations, Integer, Hash)>)

    Integrations data, response status code and response headers



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/siteimprove_api_client/api/integrations_api.rb', line 35

def integrations_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationsApi.integrations_get ...'
  end
  # resource path
  local_var_path = '/integrations'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Integrations'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"IntegrationsApi.integrations_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationsApi#integrations_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#integrations_project_management_task_managers_task_manager_tasks_get(task_manager, opts = {}) ⇒ IssueTrackerWorkItemList

List tasks created for external task management systems Get a list of tasks created for external project management systems, linking items from the Siteimprove platform, with tasks in the external systems.

Parameters:

  • task_manager (String)

    External project management system supported by Siteimprove

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:



87
88
89
90
# File 'lib/siteimprove_api_client/api/integrations_api.rb', line 87

def integrations_project_management_task_managers_task_manager_tasks_get(task_manager, opts = {})
  data, _status_code, _headers = integrations_project_management_task_managers_task_manager_tasks_get_with_http_info(task_manager, opts)
  data
end

#integrations_project_management_task_managers_task_manager_tasks_get_with_http_info(task_manager, opts = {}) ⇒ Array<(IssueTrackerWorkItemList, Integer, Hash)>

List tasks created for external task management systems Get a list of tasks created for external project management systems, linking items from the Siteimprove platform, with tasks in the external systems.

Parameters:

  • task_manager (String)

    External project management system supported by Siteimprove

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page number to show when more than one page in paged output. (default to 1)

  • :page_size (Integer)

    Number of items/records per page in paged output. (default to 10)

  • :query (String)

    Return all items that matches the specified plain text query.

Returns:

  • (Array<(IssueTrackerWorkItemList, Integer, Hash)>)

    IssueTrackerWorkItemList data, response status code and response headers



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/siteimprove_api_client/api/integrations_api.rb', line 100

def integrations_project_management_task_managers_task_manager_tasks_get_with_http_info(task_manager, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationsApi.integrations_project_management_task_managers_task_manager_tasks_get ...'
  end
  # verify the required parameter 'task_manager' is set
  if @api_client.config.client_side_validation && task_manager.nil?
    fail ArgumentError, "Missing the required parameter 'task_manager' when calling IntegrationsApi.integrations_project_management_task_managers_task_manager_tasks_get"
  end
  # verify enum value
  allowable_values = ["jira_cloud", "azure_dev_ops", "jira_on_prem_o_auth"]
  if @api_client.config.client_side_validation && !allowable_values.include?(task_manager)
    fail ArgumentError, "invalid value for \"task_manager\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling IntegrationsApi.integrations_project_management_task_managers_task_manager_tasks_get, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IntegrationsApi.integrations_project_management_task_managers_task_manager_tasks_get, must be smaller than or equal to 1000.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IntegrationsApi.integrations_project_management_task_managers_task_manager_tasks_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/integrations/project_management/task_managers/{task_manager}/tasks'.sub('{' + 'task_manager' + '}', CGI.escape(task_manager.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'IssueTrackerWorkItemList'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"IntegrationsApi.integrations_project_management_task_managers_task_manager_tasks_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationsApi#integrations_project_management_task_managers_task_manager_tasks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#integrations_project_management_task_managers_task_manager_tasks_task_id_get(task_manager, task_id, opts = {}) ⇒ IssueTrackerWorkItem1

Show data for a single task Show the details for a single task.

Parameters:

  • task_manager (String)

    External project management system supported by Siteimprove

  • task_id (Integer)

    ID of the task to display

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



174
175
176
177
# File 'lib/siteimprove_api_client/api/integrations_api.rb', line 174

def integrations_project_management_task_managers_task_manager_tasks_task_id_get(task_manager, task_id, opts = {})
  data, _status_code, _headers = integrations_project_management_task_managers_task_manager_tasks_task_id_get_with_http_info(task_manager, task_id, opts)
  data
end

#integrations_project_management_task_managers_task_manager_tasks_task_id_get_with_http_info(task_manager, task_id, opts = {}) ⇒ Array<(IssueTrackerWorkItem1, Integer, Hash)>

Show data for a single task Show the details for a single task.

Parameters:

  • task_manager (String)

    External project management system supported by Siteimprove

  • task_id (Integer)

    ID of the task to display

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(IssueTrackerWorkItem1, Integer, Hash)>)

    IssueTrackerWorkItem1 data, response status code and response headers



185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/siteimprove_api_client/api/integrations_api.rb', line 185

def integrations_project_management_task_managers_task_manager_tasks_task_id_get_with_http_info(task_manager, task_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationsApi.integrations_project_management_task_managers_task_manager_tasks_task_id_get ...'
  end
  # verify the required parameter 'task_manager' is set
  if @api_client.config.client_side_validation && task_manager.nil?
    fail ArgumentError, "Missing the required parameter 'task_manager' when calling IntegrationsApi.integrations_project_management_task_managers_task_manager_tasks_task_id_get"
  end
  # verify enum value
  allowable_values = ["jira_cloud", "azure_dev_ops", "jira_on_prem_o_auth"]
  if @api_client.config.client_side_validation && !allowable_values.include?(task_manager)
    fail ArgumentError, "invalid value for \"task_manager\", must be one of #{allowable_values}"
  end
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    fail ArgumentError, "Missing the required parameter 'task_id' when calling IntegrationsApi.integrations_project_management_task_managers_task_manager_tasks_task_id_get"
  end
  # resource path
  local_var_path = '/integrations/project_management/task_managers/{task_manager}/tasks/{task_id}'.sub('{' + 'task_manager' + '}', CGI.escape(task_manager.to_s)).sub('{' + 'task_id' + '}', CGI.escape(task_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'IssueTrackerWorkItem1'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic_auth']

  new_options = opts.merge(
    :operation => :"IntegrationsApi.integrations_project_management_task_managers_task_manager_tasks_task_id_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationsApi#integrations_project_management_task_managers_task_manager_tasks_task_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end