Class: PassiveTotal::Client::Tag
- Defined in:
- lib/passivetotal/clients/tag.rb
Constant Summary
Constants inherited from Base
Base::BASE_URL, Base::HOST, Base::VERSION
Instance Method Summary collapse
-
#delete(artifact, tags) ⇒ Hash
Remove a set of tags from an artifact or artifacts.
-
#get(artifact) ⇒ Hash
Retrieve the tags of an artifact or artifacts.
-
#set(artifact, tags) ⇒ Hash
Set the tags of an artifact or artifacts.
-
#update(artifact, tags) ⇒ Hash
Add tags to an artifact or artifacts.
Methods inherited from Base
Constructor Details
This class inherits a constructor from PassiveTotal::Client::Base
Instance Method Details
#delete(artifact, tags) ⇒ Hash
Remove a set of tags from an artifact or artifacts. api.passivetotal.org/api/docs/#api-Tag_Artifact-DeleteV2ArtifactTag
31 32 33 34 35 36 37 38 |
# File 'lib/passivetotal/clients/tag.rb', line 31 def delete(artifact, ) params = { artifact: artifact, tags: , }.compact _delete("/artifact/tag", params) { |json| json } end |
#get(artifact) ⇒ Hash
Retrieve the tags of an artifact or artifacts. api.passivetotal.org/api/docs/#api-Tag_Artifact-GetV2ArtifactTag
14 15 16 17 18 19 20 |
# File 'lib/passivetotal/clients/tag.rb', line 14 def get(artifact) params = { artifact: artifact, }.compact _get("/artifact/tag", params) { |json| json } end |
#set(artifact, tags) ⇒ Hash
Set the tags of an artifact or artifacts. api.passivetotal.org/api/docs/#api-Tag_Artifact-PutV2ArtifactTag
49 50 51 52 53 54 55 56 |
# File 'lib/passivetotal/clients/tag.rb', line 49 def set(artifact, ) params = { artifact: artifact, tags: , }.compact _put("/artifact/tag", params) { |json| json } end |
#update(artifact, tags) ⇒ Hash
Add tags to an artifact or artifacts. api.passivetotal.org/api/docs/#api-Tag_Artifact-PostV2ArtifactTag
67 68 69 70 71 72 73 74 |
# File 'lib/passivetotal/clients/tag.rb', line 67 def update(artifact, ) params = { artifact: artifact, tags: , }.compact _post("/artifact/tag", params) { |json| json } end |