Jsflagr.TagApi

July 20, 2020 ยท View on GitHub

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

MethodHTTP requestDescription
createTagPOST /flags/{flagID}/tags
deleteTagDELETE /flags/{flagID}/tags/{tagID}
findAllTagsGET /tags
findTagsGET /flags/{flagID}/tags

createTag

Tag createTag(flagID, body)

Example

var Jsflagr = require('jsflagr');

var apiInstance = new Jsflagr.TagApi();

var flagID = 789; // Number | numeric ID of the flag

var body = new Jsflagr.CreateTagRequest(); // CreateTagRequest | create a tag


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createTag(flagID, body, callback);

Parameters

NameTypeDescriptionNotes
flagIDNumbernumeric ID of the flag
bodyCreateTagRequestcreate a tag

Return type

Tag

Authorization

No authorization required

HTTP request headers

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

deleteTag

deleteTag(flagID, tagID)

Example

var Jsflagr = require('jsflagr');

var apiInstance = new Jsflagr.TagApi();

var flagID = 789; // Number | numeric ID of the flag

var tagID = 789; // Number | numeric ID of the tag


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteTag(flagID, tagID, callback);

Parameters

NameTypeDescriptionNotes
flagIDNumbernumeric ID of the flag
tagIDNumbernumeric ID of the tag

Return type

null (empty response body)

Authorization

No authorization required

HTTP request headers

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

findAllTags

[Tag] findAllTags(opts)

Example

var Jsflagr = require('jsflagr');

var apiInstance = new Jsflagr.TagApi();

var opts = { 
  'limit': 789, // Number | the numbers of tags to return
  'offset': 789, // Number | return tags given the offset, it should usually set together with limit
  'valueLike': "valueLike_example" // String | return tags partially matching given value
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.findAllTags(opts, callback);

Parameters

NameTypeDescriptionNotes
limitNumberthe numbers of tags to return[optional]
offsetNumberreturn tags given the offset, it should usually set together with limit[optional]
valueLikeStringreturn tags partially matching given value[optional]

Return type

[Tag]

Authorization

No authorization required

HTTP request headers

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

findTags

[Tag] findTags(flagID)

Example

var Jsflagr = require('jsflagr');

var apiInstance = new Jsflagr.TagApi();

var flagID = 789; // Number | numeric ID of the flag


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.findTags(flagID, callback);

Parameters

NameTypeDescriptionNotes
flagIDNumbernumeric ID of the flag

Return type

[Tag]

Authorization

No authorization required

HTTP request headers

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