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 |
open class func createMessage(body: MessagePushRequest, channelToken: String, completion: @escaping (_ data: ResultOfMessagePushResponse?, _ error: Error?) -> Void)
push Message to a Channel
- 1 request per 1s
- 30 request per 1m
- 500 request per 1h
- 0: ok
- 1: server error
- 101: channel is exists
- 102: channel is not exists
- 103: channel token error
- 104: channel is not exists
- 105: message is not exists
- 204: bad request
- 205: permission deny
- 206: too many request, please after 5 minutes to try!
- 301: duplicate username/email
- 302: user is not exists
- 303: user password is error
- 304: client push token is error
- 305: user is disabled
- 306: your subscription is expired
- 307: user not subscribe channel
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import DaDaPushClient
let body = MessagePushRequest(actions: [Action(name: "name_example", type: "type_example", url: "url_example")], content: "content_example", needPush: false, title: "title_example") // MessagePushRequest | body
let channelToken = "channelToken_example" // String | see: https://www.dadapush.com/channel/list
// push Message to a Channel
DaDaPushMessageAPI.createMessage(body: body, channelToken: channelToken) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func deleteMessage(messageId: Int64, channelToken: String, completion: @escaping (_ data: Result?, _ error: Error?) -> Void)
delete a Channel Message
- 10 request per 1s
- 100 request per 1m
- 1000 request per 1h
- 0: ok
- 1: server error
- 101: channel is exists
- 102: channel is not exists
- 103: channel token error
- 104: channel is not exists
- 105: message is not exists
- 204: bad request
- 205: permission deny
- 206: too many request, please after 5 minutes to try!
- 301: duplicate username/email
- 302: user is not exists
- 303: user password is error
- 304: client push token is error
- 305: user is disabled
- 306: your subscription is expired
- 307: user not subscribe channel
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import DaDaPushClient
let messageId = 987 // Int64 | messageId
let channelToken = "channelToken_example" // String | see: https://www.dadapush.com/channel/list
// delete a Channel Message
DaDaPushMessageAPI.deleteMessage(messageId: messageId, channelToken: channelToken) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
messageId | Int64 | messageId | |
channelToken | String | see: https://www.dadapush.com/channel/list | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func getMessage(messageId: Int64, channelToken: String, completion: @escaping (_ data: ResultOfMessageObject?, _ error: Error?) -> Void)
get a Channel Message
- 10 request per 1s
- 100 request per 1m
- 1000 request per 1h
- 0: ok
- 1: server error
- 101: channel is exists
- 102: channel is not exists
- 103: channel token error
- 104: channel is not exists
- 105: message is not exists
- 204: bad request
- 205: permission deny
- 206: too many request, please after 5 minutes to try!
- 301: duplicate username/email
- 302: user is not exists
- 303: user password is error
- 304: client push token is error
- 305: user is disabled
- 306: your subscription is expired
- 307: user not subscribe channel
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import DaDaPushClient
let messageId = 987 // Int64 | messageId
let channelToken = "channelToken_example" // String | see: https://www.dadapush.com/channel/list
// get a Channel Message
DaDaPushMessageAPI.getMessage(messageId: messageId, channelToken: channelToken) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
messageId | Int64 | messageId | |
channelToken | String | see: https://www.dadapush.com/channel/list | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
open class func getMessages(page: Int, pageSize: Int, channelToken: String, completion: @escaping (_ data: ResultOfPageResponseOfMessageObject?, _ error: Error?) -> Void)
get Message List
- 1 request per 1s
- 45 request per 1m
- 0: ok
- 1: server error
- 101: channel is exists
- 102: channel is not exists
- 103: channel token error
- 104: channel is not exists
- 105: message is not exists
- 204: bad request
- 205: permission deny
- 206: too many request, please after 5 minutes to try!
- 301: duplicate username/email
- 302: user is not exists
- 303: user password is error
- 304: client push token is error
- 305: user is disabled
- 306: your subscription is expired
- 307: user not subscribe channel
// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import DaDaPushClient
let page = 987 // Int | greater than 1 (default to 1)
let pageSize = 987 // Int | range is 1,50 (default to 10)
let channelToken = "channelToken_example" // String | see: https://www.dadapush.com/channel/list
// get Message List
DaDaPushMessageAPI.getMessages(page: page, pageSize: pageSize, channelToken: channelToken) { (response, error) in
guard error == nil else {
print(error)
return
}
if (response) {
dump(response)
}
}
Name | Type | Description | Notes |
---|---|---|---|
page | Int | greater than 1 | [default to 1] |
pageSize | Int | 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
[Back to top] [Back to API list] [Back to Model list] [Back to README]