Class: DependencyTracker::ProjectApi
- Inherits:
-
Object
- Object
- DependencyTracker::ProjectApi
- Defined in:
- lib/dependency-tracker-client/api/project_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#clone_project(opts = {}) ⇒ Project
Clones a project.
-
#clone_project_with_http_info(opts = {}) ⇒ Array<(Project, Integer, Hash)>
Clones a project.
-
#create_project(opts = {}) ⇒ Project
Creates a new project If a parent project exists, the UUID of the parent project is required.
-
#create_project_with_http_info(opts = {}) ⇒ Array<(Project, Integer, Hash)>
Creates a new project If a parent project exists, the UUID of the parent project is required.
-
#delete_project(uuid, opts = {}) ⇒ nil
Deletes a project.
-
#delete_project_with_http_info(uuid, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Deletes a project.
-
#get_project(name, version, opts = {}) ⇒ Project
Returns a specific project by its name and version.
-
#get_project1(uuid, opts = {}) ⇒ Project
Returns a specific project.
-
#get_project1_with_http_info(uuid, opts = {}) ⇒ Array<(Project, Integer, Hash)>
Returns a specific project.
-
#get_project_with_http_info(name, version, opts = {}) ⇒ Array<(Project, Integer, Hash)>
Returns a specific project by its name and version.
-
#get_projects(opts = {}) ⇒ Array<Project>
Returns a list of all projects.
-
#get_projects_by_tag(tag, opts = {}) ⇒ Array<Project>
Returns a list of all projects by tag.
-
#get_projects_by_tag_with_http_info(tag, opts = {}) ⇒ Array<(Array<Project>, Integer, Hash)>
Returns a list of all projects by tag.
-
#get_projects_with_http_info(opts = {}) ⇒ Array<(Array<Project>, Integer, Hash)>
Returns a list of all projects.
-
#initialize(api_client = ApiClient.default) ⇒ ProjectApi
constructor
A new instance of ProjectApi.
-
#update_project(opts = {}) ⇒ Project
Updates a project.
-
#update_project_with_http_info(opts = {}) ⇒ Array<(Project, Integer, Hash)>
Updates a project.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ProjectApi
Returns a new instance of ProjectApi.
19 20 21 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#clone_project(opts = {}) ⇒ Project
Clones a project
26 27 28 29 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 26 def clone_project(opts = {}) data, _status_code, _headers = clone_project_with_http_info(opts) data end |
#clone_project_with_http_info(opts = {}) ⇒ Array<(Project, Integer, Hash)>
Clones a project
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 78 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 35 def clone_project_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.clone_project ...' end # resource path local_var_path = '/v1/project/clone' # 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] || 'Project' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#clone_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_project(opts = {}) ⇒ Project
Creates a new project If a parent project exists, the UUID of the parent project is required
85 86 87 88 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 85 def create_project(opts = {}) data, _status_code, _headers = create_project_with_http_info(opts) data end |
#create_project_with_http_info(opts = {}) ⇒ Array<(Project, Integer, Hash)>
Creates a new project If a parent project exists, the UUID of the parent project is required
95 96 97 98 99 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 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 95 def create_project_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.create_project ...' end # resource path local_var_path = '/v1/project' # 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] || 'Project' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_project(uuid, opts = {}) ⇒ nil
Deletes a project
144 145 146 147 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 144 def delete_project(uuid, opts = {}) delete_project_with_http_info(uuid, opts) nil end |
#delete_project_with_http_info(uuid, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Deletes a project
153 154 155 156 157 158 159 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 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 153 def delete_project_with_http_info(uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.delete_project ...' end # verify the required parameter 'uuid' is set if @api_client.config.client_side_validation && uuid.nil? fail ArgumentError, "Missing the required parameter 'uuid' when calling ProjectApi.delete_project" end # resource path local_var_path = '/v1/project/{uuid}'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#delete_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_project(name, version, opts = {}) ⇒ Project
Returns a specific project by its name and version
203 204 205 206 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 203 def get_project(name, version, opts = {}) data, _status_code, _headers = get_project_with_http_info(name, version, opts) data end |
#get_project1(uuid, opts = {}) ⇒ Project
Returns a specific project
270 271 272 273 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 270 def get_project1(uuid, opts = {}) data, _status_code, _headers = get_project1_with_http_info(uuid, opts) data end |
#get_project1_with_http_info(uuid, opts = {}) ⇒ Array<(Project, Integer, Hash)>
Returns a specific project
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 279 def get_project1_with_http_info(uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.get_project1 ...' end # verify the required parameter 'uuid' is set if @api_client.config.client_side_validation && uuid.nil? fail ArgumentError, "Missing the required parameter 'uuid' when calling ProjectApi.get_project1" end # resource path local_var_path = '/v1/project/{uuid}'.sub('{' + 'uuid' + '}', CGI.escape(uuid.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[:body] # return_type return_type = opts[:return_type] || 'Project' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#get_project1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_project_with_http_info(name, version, opts = {}) ⇒ Array<(Project, Integer, Hash)>
Returns a specific project by its name and version
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 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 213 def get_project_with_http_info(name, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.get_project ...' end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? fail ArgumentError, "Missing the required parameter 'name' when calling ProjectApi.get_project" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling ProjectApi.get_project" end # resource path local_var_path = '/v1/project/lookup' # query parameters query_params = opts[:query_params] || {} query_params[:'name'] = name query_params[:'version'] = version # 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[:body] # return_type return_type = opts[:return_type] || 'Project' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_projects(opts = {}) ⇒ Array<Project>
Returns a list of all projects
331 332 333 334 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 331 def get_projects(opts = {}) data, _status_code, _headers = get_projects_with_http_info(opts) data end |
#get_projects_by_tag(tag, opts = {}) ⇒ Array<Project>
Returns a list of all projects by tag
390 391 392 393 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 390 def get_projects_by_tag(tag, opts = {}) data, _status_code, _headers = get_projects_by_tag_with_http_info(tag, opts) data end |
#get_projects_by_tag_with_http_info(tag, opts = {}) ⇒ Array<(Array<Project>, Integer, Hash)>
Returns a list of all projects by tag
399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 399 def get_projects_by_tag_with_http_info(tag, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.get_projects_by_tag ...' end # verify the required parameter 'tag' is set if @api_client.config.client_side_validation && tag.nil? fail ArgumentError, "Missing the required parameter 'tag' when calling ProjectApi.get_projects_by_tag" end # resource path local_var_path = '/v1/project/tag/{tag}'.sub('{' + 'tag' + '}', CGI.escape(tag.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[:body] # return_type return_type = opts[:return_type] || 'Array<Project>' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#get_projects_by_tag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_projects_with_http_info(opts = {}) ⇒ Array<(Array<Project>, Integer, Hash)>
Returns a list of all projects
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 341 def get_projects_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.get_projects ...' end # resource path local_var_path = '/v1/project' # query parameters query_params = opts[:query_params] || {} query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'excludeInactive'] = opts[:'exclude_inactive'] if !opts[:'exclude_inactive'].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[:body] # return_type return_type = opts[:return_type] || 'Array<Project>' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#get_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_project(opts = {}) ⇒ Project
Updates a project
450 451 452 453 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 450 def update_project(opts = {}) data, _status_code, _headers = update_project_with_http_info(opts) data end |
#update_project_with_http_info(opts = {}) ⇒ Array<(Project, Integer, Hash)>
Updates a project
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 |
# File 'lib/dependency-tracker-client/api/project_api.rb', line 459 def update_project_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ProjectApi.update_project ...' end # resource path local_var_path = '/v1/project' # 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] || 'Project' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] = opts.merge( :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProjectApi#update_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |