Skip to content

Latest commit

 

History

History
261 lines (168 loc) · 6.68 KB

File metadata and controls

261 lines (168 loc) · 6.68 KB

sendx.PostTagApi

All URIs are relative to https://api.sendx.io/api/v1/rest

Method HTTP request Description
createPostTag POST /post/tag Create post tag
deletePostTag DELETE /post/tag/{identifier} Delete post tag
getAllPostTags GET /post/tag Get all post tags
getPostTag GET /post/tag/{identifier} Get post tag by ID
updatePostTag PUT /post/tag/{identifier} Update post tag

createPostTag

RestRPostTag createPostTag(restEPostTag)

Create post tag

Creates a new tag for blog posts.

Example

import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';

let apiInstance = new sendx.PostTagApi();
let restEPostTag = new sendx.RestEPostTag(); // RestEPostTag | 
apiInstance.createPostTag(restEPostTag).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
restEPostTag RestEPostTag

Return type

RestRPostTag

Authorization

TeamApiKey

HTTP request headers

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

deletePostTag

MessageResponse deletePostTag(identifier)

Delete post tag

Soft deletes a post tag.

Example

import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';

let apiInstance = new sendx.PostTagApi();
let identifier = "post_tag_leBDiFdrUnRmRz4nfopSrv"; // String | The unique post tag identifier to retrieve. - `post_tag_leBDiFdrUnRmRz4nfopSrv` 
apiInstance.deletePostTag(identifier).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
identifier String The unique post tag identifier to retrieve. - `post_tag_leBDiFdrUnRmRz4nfopSrv`

Return type

MessageResponse

Authorization

TeamApiKey

HTTP request headers

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

getAllPostTags

[RestRPostTag] getAllPostTags()

Get all post tags

Retrieves all blog post tags.

Example

import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';

let apiInstance = new sendx.PostTagApi();
apiInstance.getAllPostTags().then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

[RestRPostTag]

Authorization

TeamApiKey

HTTP request headers

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

getPostTag

RestRPostTag getPostTag(identifier)

Get post tag by ID

Retrieves a specific post tag.

Example

import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';

let apiInstance = new sendx.PostTagApi();
let identifier = "post_tag_leBDiFdrUnRmRz4nfopSrv"; // String | The unique post tag identifier to retrieve. - `post_tag_leBDiFdrUnRmRz4nfopSrv` 
apiInstance.getPostTag(identifier).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
identifier String The unique post tag identifier to retrieve. - `post_tag_leBDiFdrUnRmRz4nfopSrv`

Return type

RestRPostTag

Authorization

TeamApiKey

HTTP request headers

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

updatePostTag

RestRPostTag updatePostTag(restEPostTag, identifier)

Update post tag

Updates a post tag.

Example

import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';

let apiInstance = new sendx.PostTagApi();
let restEPostTag = new sendx.RestEPostTag(); // RestEPostTag | 
let identifier = "post_tag_leBDiFdrUnRmRz4nfopSrv"; // String | The unique post tag identifier to retrieve. - `post_tag_leBDiFdrUnRmRz4nfopSrv` 
apiInstance.updatePostTag(restEPostTag, identifier).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
restEPostTag RestEPostTag
identifier String The unique post tag identifier to retrieve. - `post_tag_leBDiFdrUnRmRz4nfopSrv`

Return type

RestRPostTag

Authorization

TeamApiKey

HTTP request headers

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