Class: KazeClient::AddTagRequest
- Inherits:
-
Utils::FinalRequest
- Object
- Request
- Utils::FinalRequest
- KazeClient::AddTagRequest
- Includes:
- Utils::AuthentifiedRequest
- Defined in:
- lib/kaze_client/request/requests/jobs/add_tag_request.rb
Overview
Note:
This API is under development and does not work well. When you add a tag with it, it does not check if the id is correct or not and it deletes all the other tags. It should be fixed in a next version of Kaze API.
Add tags to a job. Will make a request like this:
PUT https://kaze.modulotech.fr/api/tags/references/job/123
--- HEADERS ---
{
"Authorization": "token", "Content-Type": "application/json", "Accept": "application/json"
}
--- BODY ---
{
"tags": [1, 2, 3]
}
Constant Summary
Constants inherited from Request
Instance Attribute Summary
Attributes included from Utils::AuthentifiedRequest
Attributes inherited from Request
#body, #headers, #method, #query, #url
Instance Method Summary collapse
-
#initialize(job_id, tag_ids) ⇒ AddTagRequest
constructor
A new instance of AddTagRequest.
Methods included from Utils::AuthentifiedRequest
Methods inherited from Request
Constructor Details
#initialize(job_id, tag_ids) ⇒ AddTagRequest
Returns a new instance of AddTagRequest.
34 35 36 37 38 |
# File 'lib/kaze_client/request/requests/jobs/add_tag_request.rb', line 34 def initialize(job_id, tag_ids) super(:put, "/api/tags/references/job/#{job_id}") @body = { tags: tag_ids } end |