Flagr::TagApi

July 17, 2020 ยท View on GitHub

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

MethodHTTP requestDescription
create_tagPOST /flags/{flagID}/tags
delete_tagDELETE /flags/{flagID}/tags/{tagID}
find_all_tagsGET /tags
find_tagsGET /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

NameTypeDescriptionNotes
flag_idIntegernumeric ID of the flag
bodyCreateTagRequestcreate 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

NameTypeDescriptionNotes
flag_idIntegernumeric ID of the flag
tag_idIntegernumeric 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

NameTypeDescriptionNotes
limitIntegerthe numbers of tags to return[optional]
offsetIntegerreturn tags given the offset, it should usually set together with limit[optional]
value_likeStringreturn 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

NameTypeDescriptionNotes
flag_idIntegernumeric ID of the flag

Return type

Array<Tag>

Authorization

No authorization required

HTTP request headers

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