Class: CrelateClient::TasksApi
- Inherits:
-
Object
- Object
- CrelateClient::TasksApi
- Defined in:
- lib/crelate_client/api/tasks_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ TasksApi
constructor
A new instance of TasksApi.
-
#public_api_delete_task(task_id, api_key, opts = {}) ⇒ Object
delete a task.
-
#public_api_delete_task_with_http_info(task_id, api_key, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
delete a task.
-
#public_api_get_task(task_id, api_key, opts = {}) ⇒ PublicApiGetTaskResponse
retrieve a task.
-
#public_api_get_task_with_http_info(task_id, api_key, opts = {}) ⇒ Array<(PublicApiGetTaskResponse, Fixnum, Hash)>
retrieve a task.
-
#public_api_post_task(api_key, request, opts = {}) ⇒ PublicApiIdResponse
create a task.
-
#public_api_post_task_with_http_info(api_key, request, opts = {}) ⇒ Array<(PublicApiIdResponse, Fixnum, Hash)>
create a task.
-
#public_api_put_task(task_id, api_key, request, opts = {}) ⇒ Object
update a task Replaces all fields.
-
#public_api_put_task_with_http_info(task_id, api_key, request, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
update a task Replaces all fields.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/crelate_client/api/tasks_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#public_api_delete_task(task_id, api_key, opts = {}) ⇒ Object
delete a task
29 30 31 32 |
# File 'lib/crelate_client/api/tasks_api.rb', line 29 def public_api_delete_task(task_id, api_key, opts = {}) data, _status_code, _headers = public_api_delete_task_with_http_info(task_id, api_key, opts) return data end |
#public_api_delete_task_with_http_info(task_id, api_key, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
delete a task
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 78 79 80 81 |
# File 'lib/crelate_client/api/tasks_api.rb', line 40 def public_api_delete_task_with_http_info(task_id, api_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TasksApi.public_api_delete_task ..." 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 TasksApi.public_api_delete_task" end # verify the required parameter 'api_key' is set if @api_client.config.client_side_validation && api_key.nil? fail ArgumentError, "Missing the required parameter 'api_key' when calling TasksApi.public_api_delete_task" end # resource path local_var_path = "/api/pub/v1/tasks/{taskId}".sub('{' + 'taskId' + '}', task_id.to_s) # query parameters query_params = {} query_params[:'api_key'] = api_key # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: TasksApi#public_api_delete_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#public_api_get_task(task_id, api_key, opts = {}) ⇒ PublicApiGetTaskResponse
retrieve a task
89 90 91 92 |
# File 'lib/crelate_client/api/tasks_api.rb', line 89 def public_api_get_task(task_id, api_key, opts = {}) data, _status_code, _headers = public_api_get_task_with_http_info(task_id, api_key, opts) return data end |
#public_api_get_task_with_http_info(task_id, api_key, opts = {}) ⇒ Array<(PublicApiGetTaskResponse, Fixnum, Hash)>
retrieve a task
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 |
# File 'lib/crelate_client/api/tasks_api.rb', line 100 def public_api_get_task_with_http_info(task_id, api_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TasksApi.public_api_get_task ..." 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 TasksApi.public_api_get_task" end # verify the required parameter 'api_key' is set if @api_client.config.client_side_validation && api_key.nil? fail ArgumentError, "Missing the required parameter 'api_key' when calling TasksApi.public_api_get_task" end # resource path local_var_path = "/api/pub/v1/tasks/{taskId}".sub('{' + 'taskId' + '}', task_id.to_s) # query parameters query_params = {} query_params[:'api_key'] = api_key # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PublicApiGetTaskResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: TasksApi#public_api_get_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#public_api_post_task(api_key, request, opts = {}) ⇒ PublicApiIdResponse
create a task
149 150 151 152 |
# File 'lib/crelate_client/api/tasks_api.rb', line 149 def public_api_post_task(api_key, request, opts = {}) data, _status_code, _headers = public_api_post_task_with_http_info(api_key, request, opts) return data end |
#public_api_post_task_with_http_info(api_key, request, opts = {}) ⇒ Array<(PublicApiIdResponse, Fixnum, Hash)>
create a task
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/crelate_client/api/tasks_api.rb', line 160 def public_api_post_task_with_http_info(api_key, request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TasksApi.public_api_post_task ..." end # verify the required parameter 'api_key' is set if @api_client.config.client_side_validation && api_key.nil? fail ArgumentError, "Missing the required parameter 'api_key' when calling TasksApi.public_api_post_task" end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling TasksApi.public_api_post_task" end # resource path local_var_path = "/api/pub/v1/tasks" # query parameters query_params = {} query_params[:'api_key'] = api_key # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'PublicApiIdResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: TasksApi#public_api_post_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#public_api_put_task(task_id, api_key, request, opts = {}) ⇒ Object
update a task Replaces all fields. To partially update a task, first retrieve it using the GET method, apply changes and submit to the PUT method.
212 213 214 215 |
# File 'lib/crelate_client/api/tasks_api.rb', line 212 def public_api_put_task(task_id, api_key, request, opts = {}) data, _status_code, _headers = public_api_put_task_with_http_info(task_id, api_key, request, opts) return data end |
#public_api_put_task_with_http_info(task_id, api_key, request, opts = {}) ⇒ Array<(Object, Fixnum, Hash)>
update a task Replaces all fields. To partially update a task, first retrieve it using the GET method, apply changes and submit to the PUT method.
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/crelate_client/api/tasks_api.rb', line 224 def public_api_put_task_with_http_info(task_id, api_key, request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: TasksApi.public_api_put_task ..." 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 TasksApi.public_api_put_task" end # verify the required parameter 'api_key' is set if @api_client.config.client_side_validation && api_key.nil? fail ArgumentError, "Missing the required parameter 'api_key' when calling TasksApi.public_api_put_task" end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling TasksApi.public_api_put_task" end # resource path local_var_path = "/api/pub/v1/tasks/{taskId}".sub('{' + 'taskId' + '}', task_id.to_s) # query parameters query_params = {} query_params[:'api_key'] = api_key # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/x-www-form-urlencoded']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(request) auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Object') if @api_client.config.debugging @api_client.config.logger.debug "API called: TasksApi#public_api_put_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |