# egoisdk.TagsApi All URIs are relative to *https://api.egoiapp.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**createTag**](TagsApi.md#createTag) | **POST** /tags | Create new tag [**deleteTag**](TagsApi.md#deleteTag) | **DELETE** /tags/{tag_id} | Remove tag [**getAllTags**](TagsApi.md#getAllTags) | **GET** /tags | Get all tags [**updateTag**](TagsApi.md#updateTag) | **PUT** /tags/{tag_id} | Update a specific tag ## createTag > Tag createTag(tagRequest) Create new tag Create a new tag ### Example ```javascript import egoisdk from 'egoisdk'; let defaultClient = egoisdk.ApiClient.instance; // Configure API key authorization: Apikey let Apikey = defaultClient.authentications['Apikey']; Apikey.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Apikey.apiKeyPrefix = 'Token'; let apiInstance = new egoisdk.TagsApi(); let tagRequest = new egoisdk.TagRequest(); // TagRequest | Parameters for the Tag apiInstance.createTag(tagRequest, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **tagRequest** | [**TagRequest**](TagRequest.md)| Parameters for the Tag | ### Return type [**Tag**](Tag.md) ### Authorization [Apikey](../README.md#Apikey) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## deleteTag > deleteTag(tagId) Remove tag Remove tag information given its ID ### Example ```javascript import egoisdk from 'egoisdk'; let defaultClient = egoisdk.ApiClient.instance; // Configure API key authorization: Apikey let Apikey = defaultClient.authentications['Apikey']; Apikey.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Apikey.apiKeyPrefix = 'Token'; let apiInstance = new egoisdk.TagsApi(); let tagId = 56; // Number | ID of the Tag apiInstance.deleteTag(tagId, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully.'); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **tagId** | **Number**| ID of the Tag | ### Return type null (empty response body) ### Authorization [Apikey](../README.md#Apikey) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## getAllTags > TagCollection getAllTags(opts) Get all tags Returns all tags ### Example ```javascript import egoisdk from 'egoisdk'; let defaultClient = egoisdk.ApiClient.instance; // Configure API key authorization: Apikey let Apikey = defaultClient.authentications['Apikey']; Apikey.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Apikey.apiKeyPrefix = 'Token'; let apiInstance = new egoisdk.TagsApi(); let opts = { 'offset': 56, // Number | Element offset (starting at zero for the first element) 'limit': 10, // Number | Number of items to return 'order': "'desc'", // String | Type of order 'orderBy': "'tag_id'" // String | Reference attribute to order tags }; apiInstance.getAllTags(opts, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **offset** | **Number**| Element offset (starting at zero for the first element) | [optional] **limit** | **Number**| Number of items to return | [optional] [default to 10] **order** | **String**| Type of order | [optional] [default to 'desc'] **orderBy** | **String**| Reference attribute to order tags | [optional] [default to 'tag_id'] ### Return type [**TagCollection**](TagCollection.md) ### Authorization [Apikey](../README.md#Apikey) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## updateTag > Tag updateTag(tagId, tagRequest) Update a specific tag Update a tag ### Example ```javascript import egoisdk from 'egoisdk'; let defaultClient = egoisdk.ApiClient.instance; // Configure API key authorization: Apikey let Apikey = defaultClient.authentications['Apikey']; Apikey.apiKey = 'YOUR API KEY'; // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //Apikey.apiKeyPrefix = 'Token'; let apiInstance = new egoisdk.TagsApi(); let tagId = 56; // Number | ID of the Tag let tagRequest = new egoisdk.TagRequest(); // TagRequest | Parameters for the tag apiInstance.updateTag(tagId, tagRequest, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **tagId** | **Number**| ID of the Tag | **tagRequest** | [**TagRequest**](TagRequest.md)| Parameters for the tag | ### Return type [**Tag**](Tag.md) ### Authorization [Apikey](../README.md#Apikey) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json