Skip to content

Latest commit

 

History

History
216 lines (144 loc) · 6.27 KB

Class5QueuesApi.md

File metadata and controls

216 lines (144 loc) · 6.27 KB

Node.Class5QueuesApi

All URIs are relative to https://api.chat-api.com

Method HTTP request Description
clearActionsQueue POST /clearActionsQueue Clear outbound actions queue.
clearMessagesQueue POST /clearMessagesQueue Clear outbound messages queue.
showActionsQueue GET /showActionsQueue Get outbound messages queue.
showMessagesQueue GET /showMessagesQueue Get outbound messages queue.

clearActionsQueue

ClearActionsQueueStatus clearActionsQueue()

Clear outbound actions queue.

This method is needed when you accidentally sent thousands of actions in a row.

Example

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

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

Parameters

This endpoint does not need any parameter.

Return type

ClearActionsQueueStatus

Authorization

instanceId, token

HTTP request headers

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

clearMessagesQueue

ClearMessagesQueueStatus clearMessagesQueue()

Clear outbound messages queue.

This method is needed when you accidentally sent thousands of messages in a row.

Example

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

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

Parameters

This endpoint does not need any parameter.

Return type

ClearMessagesQueueStatus

Authorization

instanceId, token

HTTP request headers

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

showActionsQueue

OutboundActions showActionsQueue()

Get outbound messages queue.

When you create an action, all actions are queued up. If an action is not executed, it remains in the queue and will be sent for execution in time. again. The action cannot be executed due to the status of the device connected to the account. This method give the last 100 actions in the queue.

Example

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

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

Parameters

This endpoint does not need any parameter.

Return type

OutboundActions

Authorization

instanceId, token

HTTP request headers

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

showMessagesQueue

OutboundMessages showMessagesQueue()

Get outbound messages queue.

When sending messages, all messages are in the queue. If the message is not sent, then it remains in the queue and in time it will be sent again. The message may not be sent due to the status of the device connected to the account. This method give the last 100 messages in the queue.

Example

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

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

Parameters

This endpoint does not need any parameter.

Return type

OutboundMessages

Authorization

instanceId, token

HTTP request headers

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