Skip to content

Latest commit

 

History

History
372 lines (289 loc) · 12.1 KB

File metadata and controls

372 lines (289 loc) · 12.1 KB

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 classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.PostTagApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
    
    // Configure API key authorization: TeamApiKey
    ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
    TeamApiKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //TeamApiKey.setApiKeyPrefix("Token");

    PostTagApi apiInstance = new PostTagApi(defaultClient);
    RestEPostTag restEPostTag = new RestEPostTag(); // RestEPostTag | 
    try {
      RestRPostTag result = apiInstance.createPostTag(restEPostTag);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling PostTagApi#createPostTag");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
restEPostTag RestEPostTag

Return type

RestRPostTag

Authorization

TeamApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 ✅ Tag created successfully -
400 ❌ Bad Request - Invalid input data -
401 ❌ Unauthorized - Invalid or missing API key -
403 ❌ Forbidden - Resource name already exists -
422 ❌ Unprocessable Entity - Invalid request format -
500 ❌ Internal Server Error - System error occurred -

deletePostTag

MessageResponse deletePostTag(identifier)

Delete post tag

Soft deletes a post tag.

Example

// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.PostTagApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
    
    // Configure API key authorization: TeamApiKey
    ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
    TeamApiKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //TeamApiKey.setApiKeyPrefix("Token");

    PostTagApi apiInstance = new PostTagApi(defaultClient);
    String identifier = "post_tag_leBDiFdrUnRmRz4nfopSrv"; // String | The unique post tag identifier to retrieve. - `post_tag_leBDiFdrUnRmRz4nfopSrv` 
    try {
      MessageResponse result = apiInstance.deletePostTag(identifier);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling PostTagApi#deletePostTag");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

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

HTTP response details

Status code Description Response headers
200 ✅ Tag deleted successfully -
401 ❌ Unauthorized - Invalid or missing API key -
404 ❌ Not Found - Resource does not exist -

getAllPostTags

List<RestRPostTag> getAllPostTags()

Get all post tags

Retrieves all blog post tags.

Example

// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.PostTagApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
    
    // Configure API key authorization: TeamApiKey
    ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
    TeamApiKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //TeamApiKey.setApiKeyPrefix("Token");

    PostTagApi apiInstance = new PostTagApi(defaultClient);
    try {
      List<RestRPostTag> result = apiInstance.getAllPostTags();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling PostTagApi#getAllPostTags");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

This endpoint does not need any parameter.

Return type

List<RestRPostTag>

Authorization

TeamApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 ✅ Tags retrieved successfully -
401 ❌ Unauthorized - Invalid or missing API key -
500 ❌ Internal Server Error - System error occurred -

getPostTag

RestRPostTag getPostTag(identifier)

Get post tag by ID

Retrieves a specific post tag.

Example

// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.PostTagApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
    
    // Configure API key authorization: TeamApiKey
    ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
    TeamApiKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //TeamApiKey.setApiKeyPrefix("Token");

    PostTagApi apiInstance = new PostTagApi(defaultClient);
    String identifier = "post_tag_leBDiFdrUnRmRz4nfopSrv"; // String | The unique post tag identifier to retrieve. - `post_tag_leBDiFdrUnRmRz4nfopSrv` 
    try {
      RestRPostTag result = apiInstance.getPostTag(identifier);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling PostTagApi#getPostTag");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

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

HTTP response details

Status code Description Response headers
200 ✅ Tag retrieved successfully -
401 ❌ Unauthorized - Invalid or missing API key -
404 ❌ Not Found - Resource does not exist -
500 ❌ Internal Server Error - System error occurred -

updatePostTag

RestRPostTag updatePostTag(identifier, restEPostTag)

Update post tag

Updates a post tag.

Example

// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.PostTagApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
    
    // Configure API key authorization: TeamApiKey
    ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
    TeamApiKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //TeamApiKey.setApiKeyPrefix("Token");

    PostTagApi apiInstance = new PostTagApi(defaultClient);
    String identifier = "post_tag_leBDiFdrUnRmRz4nfopSrv"; // String | The unique post tag identifier to retrieve. - `post_tag_leBDiFdrUnRmRz4nfopSrv` 
    RestEPostTag restEPostTag = new RestEPostTag(); // RestEPostTag | 
    try {
      RestRPostTag result = apiInstance.updatePostTag(identifier, restEPostTag);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling PostTagApi#updatePostTag");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

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

Return type

RestRPostTag

Authorization

TeamApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 ✅ Tag updated successfully -
400 ❌ Bad Request - Invalid input data -
401 ❌ Unauthorized - Invalid or missing API key -
404 ❌ Not Found - Resource does not exist -
409 ❌ Conflict - Resource already exists -