Skip to content

Latest commit

 

History

History
198 lines (121 loc) · 3.84 KB

TagApi.md

File metadata and controls

198 lines (121 loc) · 3.84 KB

Flagr::TagApi

All URIs are relative to http://localhost/api/v1

Method HTTP request Description
create_tag POST /flags/{flagID}/tags
delete_tag DELETE /flags/{flagID}/tags/{tagID}
find_all_tags GET /tags
find_tags GET /flags/{flagID}/tags

create_tag

Tag create_tag(flag_id, body)

Example

# load the gem
require 'rbflagr'

api_instance = Flagr::TagApi.new

flag_id = 789 # Integer | numeric ID of the flag

body = Flagr::CreateTagRequest.new # CreateTagRequest | create a tag


begin
  result = api_instance.create_tag(flag_id, body)
  p result
rescue Flagr::ApiError => e
  puts "Exception when calling TagApi->create_tag: #{e}"
end

Parameters

Name Type Description Notes
flag_id Integer numeric ID of the flag
body CreateTagRequest create a tag

Return type

Tag

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

delete_tag

delete_tag(flag_id, tag_id)

Example

# load the gem
require 'rbflagr'

api_instance = Flagr::TagApi.new

flag_id = 789 # Integer | numeric ID of the flag

tag_id = 789 # Integer | numeric ID of the tag


begin
  api_instance.delete_tag(flag_id, tag_id)
rescue Flagr::ApiError => e
  puts "Exception when calling TagApi->delete_tag: #{e}"
end

Parameters

Name Type Description Notes
flag_id Integer numeric ID of the flag
tag_id Integer numeric ID of the tag

Return type

nil (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

find_all_tags

Array<Tag> find_all_tags(opts)

Example

# load the gem
require 'rbflagr'

api_instance = Flagr::TagApi.new

opts = { 
  limit: 789, # Integer | the numbers of tags to return
  offset: 789, # Integer | return tags given the offset, it should usually set together with limit
  value_like: 'value_like_example' # String | return tags partially matching given value
}

begin
  result = api_instance.find_all_tags(opts)
  p result
rescue Flagr::ApiError => e
  puts "Exception when calling TagApi->find_all_tags: #{e}"
end

Parameters

Name Type Description Notes
limit Integer the numbers of tags to return [optional]
offset Integer return tags given the offset, it should usually set together with limit [optional]
value_like String return tags partially matching given value [optional]

Return type

Array<Tag>

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

find_tags

Array<Tag> find_tags(flag_id)

Example

# load the gem
require 'rbflagr'

api_instance = Flagr::TagApi.new

flag_id = 789 # Integer | numeric ID of the flag


begin
  result = api_instance.find_tags(flag_id)
  p result
rescue Flagr::ApiError => e
  puts "Exception when calling TagApi->find_tags: #{e}"
end

Parameters

Name Type Description Notes
flag_id Integer numeric ID of the flag

Return type

Array<Tag>

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json