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, xChannelToken)
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 classes:
import com.dadapush.client.ApiClient;
import com.dadapush.client.ApiException;
import com.dadapush.client.Configuration;
import com.dadapush.client.models.*;
import com.dadapush.client.api.DaDaPushMessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://www.dadapush.com");
DaDaPushMessageApi apiInstance = new DaDaPushMessageApi(defaultClient);
MessagePushRequest body = new MessagePushRequest(); // MessagePushRequest | body
String xChannelToken = "xChannelToken_example"; // String | see: https://www.dadapush.com/channel/list
try {
ResultOfMessagePushResponse result = apiInstance.createMessage(body, xChannelToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DaDaPushMessageApi#createMessage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
body | MessagePushRequest | body | |
xChannelToken | String | see: https://www.dadapush.com/channel/list | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
Result deleteMessage(messageId, xChannelToken)
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 classes:
import com.dadapush.client.ApiClient;
import com.dadapush.client.ApiException;
import com.dadapush.client.Configuration;
import com.dadapush.client.models.*;
import com.dadapush.client.api.DaDaPushMessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://www.dadapush.com");
DaDaPushMessageApi apiInstance = new DaDaPushMessageApi(defaultClient);
Long messageId = 56L; // Long | messageId
String xChannelToken = "xChannelToken_example"; // String | see: https://www.dadapush.com/channel/list
try {
Result result = apiInstance.deleteMessage(messageId, xChannelToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DaDaPushMessageApi#deleteMessage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
messageId | Long | messageId | |
xChannelToken | String | see: https://www.dadapush.com/channel/list | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
ResultOfMessageObject getMessage(messageId, xChannelToken)
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 classes:
import com.dadapush.client.ApiClient;
import com.dadapush.client.ApiException;
import com.dadapush.client.Configuration;
import com.dadapush.client.models.*;
import com.dadapush.client.api.DaDaPushMessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://www.dadapush.com");
DaDaPushMessageApi apiInstance = new DaDaPushMessageApi(defaultClient);
Long messageId = 56L; // Long | messageId
String xChannelToken = "xChannelToken_example"; // String | see: https://www.dadapush.com/channel/list
try {
ResultOfMessageObject result = apiInstance.getMessage(messageId, xChannelToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DaDaPushMessageApi#getMessage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
messageId | Long | messageId | |
xChannelToken | String | see: https://www.dadapush.com/channel/list | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
ResultOfPageResponseOfMessageObject getMessages(page, pageSize, xChannelToken)
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 classes:
import com.dadapush.client.ApiClient;
import com.dadapush.client.ApiException;
import com.dadapush.client.Configuration;
import com.dadapush.client.models.*;
import com.dadapush.client.api.DaDaPushMessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://www.dadapush.com");
DaDaPushMessageApi apiInstance = new DaDaPushMessageApi(defaultClient);
Integer page = 1; // Integer | greater than 1
Integer pageSize = 10; // Integer | range is 1,50
String xChannelToken = "xChannelToken_example"; // String | see: https://www.dadapush.com/channel/list
try {
ResultOfPageResponseOfMessageObject result = apiInstance.getMessages(page, pageSize, xChannelToken);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DaDaPushMessageApi#getMessages");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
page | Integer | greater than 1 | [default to 1] |
pageSize | Integer | range is 1,50 | [default to 10] |
xChannelToken | String | see: https://www.dadapush.com/channel/list | [optional] |
ResultOfPageResponseOfMessageObject
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |