All URIs are relative to https://www.dadapush.com
| Method | HTTP request | Description |
|---|---|---|
| createMessage | POST /api/v1/message | push Message to a Channel |
| deleteMessage | DELETE /api/v1/message/{messageId} | delete a Channel Message |
| getMessage | GET /api/v1/message/{messageId} | get a Channel Message |
| getMessages | GET /api/v1/messages | get Message List |
ResultOfMessagePushResponse createMessage(body, opts)
push Message to a Channel
<h2>Rate Limit:</h2><ul><li>1 request per 1s</li><li>30 request per 1m</li><li>500 request per 1h</li></ul><h2>Result code/errmsg List:</h2><ul><li>0: ok</li><li>1: server error</li><li>101: channel is exists</li><li>102: channel is not exists</li><li>103: channel token error</li><li>104: channel is not exists</li><li>105: message is not exists</li><li>204: bad request</li><li>205: permission deny</li><li>206: too many request, please after 5 minutes to try!</li><li>301: duplicate username/email</li><li>302: user is not exists</li><li>303: user password is error</li><li>304: client push token is error</li><li>305: user is disabled</li><li>306: your subscription is expired</li><li>307: user not subscribe channel</li></ul>
import DadapushClient from 'dadapush-client';
let apiInstance = new DadapushClient.DaDaPushMessageApi();
let body = new DadapushClient.MessagePushRequest(); // MessagePushRequest | body
let opts = {
'channelToken': "channelToken_example" // String | see: https://www.dadapush.com/channel/list
};
apiInstance.createMessage(body, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| body | MessagePushRequest | body | |
| channelToken | String | see: https://www.dadapush.com/channel/list | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Result deleteMessage(messageId, opts)
delete a Channel Message
<h2>Rate Limit:</h2><ul><li>10 request per 1s</li><li>100 request per 1m</li><li>1000 request per 1h</li></ul><h2>Result code/errmsg List:</h2><ul><li>0: ok</li><li>1: server error</li><li>101: channel is exists</li><li>102: channel is not exists</li><li>103: channel token error</li><li>104: channel is not exists</li><li>105: message is not exists</li><li>204: bad request</li><li>205: permission deny</li><li>206: too many request, please after 5 minutes to try!</li><li>301: duplicate username/email</li><li>302: user is not exists</li><li>303: user password is error</li><li>304: client push token is error</li><li>305: user is disabled</li><li>306: your subscription is expired</li><li>307: user not subscribe channel</li></ul>
import DadapushClient from 'dadapush-client';
let apiInstance = new DadapushClient.DaDaPushMessageApi();
let messageId = 789; // Number | messageId
let opts = {
'channelToken': "channelToken_example" // String | see: https://www.dadapush.com/channel/list
};
apiInstance.deleteMessage(messageId, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| messageId | Number | messageId | |
| channelToken | String | see: https://www.dadapush.com/channel/list | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
ResultOfMessageObject getMessage(messageId, opts)
get a Channel Message
<h2>Rate Limit:</h2><ul><li>10 request per 1s</li><li>100 request per 1m</li><li>1000 request per 1h</li></ul><h2>Result code/errmsg List:</h2><ul><li>0: ok</li><li>1: server error</li><li>101: channel is exists</li><li>102: channel is not exists</li><li>103: channel token error</li><li>104: channel is not exists</li><li>105: message is not exists</li><li>204: bad request</li><li>205: permission deny</li><li>206: too many request, please after 5 minutes to try!</li><li>301: duplicate username/email</li><li>302: user is not exists</li><li>303: user password is error</li><li>304: client push token is error</li><li>305: user is disabled</li><li>306: your subscription is expired</li><li>307: user not subscribe channel</li></ul>
import DadapushClient from 'dadapush-client';
let apiInstance = new DadapushClient.DaDaPushMessageApi();
let messageId = 789; // Number | messageId
let opts = {
'channelToken': "channelToken_example" // String | see: https://www.dadapush.com/channel/list
};
apiInstance.getMessage(messageId, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| messageId | Number | messageId | |
| channelToken | String | see: https://www.dadapush.com/channel/list | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
ResultOfPageResponseOfMessageObject getMessages(page, pageSize, opts)
get Message List
<h2>Rate Limit:</h2><ul><li>1 request per 1s</li><li>45 request per 1m</li></ul><h2>Result code/errmsg List:</h2><ul><li>0: ok</li><li>1: server error</li><li>101: channel is exists</li><li>102: channel is not exists</li><li>103: channel token error</li><li>104: channel is not exists</li><li>105: message is not exists</li><li>204: bad request</li><li>205: permission deny</li><li>206: too many request, please after 5 minutes to try!</li><li>301: duplicate username/email</li><li>302: user is not exists</li><li>303: user password is error</li><li>304: client push token is error</li><li>305: user is disabled</li><li>306: your subscription is expired</li><li>307: user not subscribe channel</li></ul>
import DadapushClient from 'dadapush-client';
let apiInstance = new DadapushClient.DaDaPushMessageApi();
let page = 1; // Number | greater than 1
let pageSize = 10; // Number | range is 1,50
let opts = {
'channelToken': "channelToken_example" // String | see: https://www.dadapush.com/channel/list
};
apiInstance.getMessages(page, pageSize, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| page | Number | greater than 1 | [default to 1] |
| pageSize | Number | range is 1,50 | [default to 10] |
| channelToken | String | see: https://www.dadapush.com/channel/list | [optional] |
ResultOfPageResponseOfMessageObject
No authorization required
- Content-Type: Not defined
- Accept: application/json