|
|
@@ -1,146 +0,0 @@
|
|
|
-package push
|
|
|
-
|
|
|
-//Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
-//you may not use this file except in compliance with the License.
|
|
|
-//You may obtain a copy of the License at
|
|
|
-//
|
|
|
-//http://www.apache.org/licenses/LICENSE-2.0
|
|
|
-//
|
|
|
-//Unless required by applicable law or agreed to in writing, software
|
|
|
-//distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
-//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
-//See the License for the specific language governing permissions and
|
|
|
-//limitations under the License.
|
|
|
-//
|
|
|
-// Code generated by Alibaba Cloud SDK Code Generator.
|
|
|
-// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
|
-
|
|
|
-import (
|
|
|
- "github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
|
|
|
- "github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
|
|
|
-)
|
|
|
-
|
|
|
-// QueryPushDetail invokes the push.QueryPushDetail API synchronously
|
|
|
-// api document: https://help.aliyun.com/api/push/querypushdetail.html
|
|
|
-func (client *Client) QueryPushDetail(request *QueryPushDetailRequest) (response *QueryPushDetailResponse, err error) {
|
|
|
- response = CreateQueryPushDetailResponse()
|
|
|
- err = client.DoAction(request, response)
|
|
|
- return
|
|
|
-}
|
|
|
-
|
|
|
-// QueryPushDetailWithChan invokes the push.QueryPushDetail API asynchronously
|
|
|
-// api document: https://help.aliyun.com/api/push/querypushdetail.html
|
|
|
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
|
|
|
-func (client *Client) QueryPushDetailWithChan(request *QueryPushDetailRequest) (<-chan *QueryPushDetailResponse, <-chan error) {
|
|
|
- responseChan := make(chan *QueryPushDetailResponse, 1)
|
|
|
- errChan := make(chan error, 1)
|
|
|
- err := client.AddAsyncTask(func() {
|
|
|
- defer close(responseChan)
|
|
|
- defer close(errChan)
|
|
|
- response, err := client.QueryPushDetail(request)
|
|
|
- if err != nil {
|
|
|
- errChan <- err
|
|
|
- } else {
|
|
|
- responseChan <- response
|
|
|
- }
|
|
|
- })
|
|
|
- if err != nil {
|
|
|
- errChan <- err
|
|
|
- close(responseChan)
|
|
|
- close(errChan)
|
|
|
- }
|
|
|
- return responseChan, errChan
|
|
|
-}
|
|
|
-
|
|
|
-// QueryPushDetailWithCallback invokes the push.QueryPushDetail API asynchronously
|
|
|
-// api document: https://help.aliyun.com/api/push/querypushdetail.html
|
|
|
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
|
|
|
-func (client *Client) QueryPushDetailWithCallback(request *QueryPushDetailRequest, callback func(response *QueryPushDetailResponse, err error)) <-chan int {
|
|
|
- result := make(chan int, 1)
|
|
|
- err := client.AddAsyncTask(func() {
|
|
|
- var response *QueryPushDetailResponse
|
|
|
- var err error
|
|
|
- defer close(result)
|
|
|
- response, err = client.QueryPushDetail(request)
|
|
|
- callback(response, err)
|
|
|
- result <- 1
|
|
|
- })
|
|
|
- if err != nil {
|
|
|
- defer close(result)
|
|
|
- callback(nil, err)
|
|
|
- result <- 0
|
|
|
- }
|
|
|
- return result
|
|
|
-}
|
|
|
-
|
|
|
-// QueryPushDetailRequest is the request struct for api QueryPushDetail
|
|
|
-type QueryPushDetailRequest struct {
|
|
|
- *requests.RpcRequest
|
|
|
- AppKey requests.Integer `position:"Query" name:"AppKey"`
|
|
|
- MessageId string `position:"Query" name:"MessageId"`
|
|
|
-}
|
|
|
-
|
|
|
-// QueryPushDetailResponse is the response struct for api QueryPushDetail
|
|
|
-type QueryPushDetailResponse struct {
|
|
|
- *responses.BaseResponse
|
|
|
- RequestId string `json:"RequestId" xml:"RequestId"`
|
|
|
- AppKey int `json:"AppKey" xml:"AppKey"`
|
|
|
- Target string `json:"Target" xml:"Target"`
|
|
|
- TargetValue string `json:"TargetValue" xml:"TargetValue"`
|
|
|
- PushType string `json:"PushType" xml:"PushType"`
|
|
|
- DeviceType string `json:"DeviceType" xml:"DeviceType"`
|
|
|
- Title string `json:"Title" xml:"Title"`
|
|
|
- Body string `json:"Body" xml:"Body"`
|
|
|
- PushTime string `json:"PushTime" xml:"PushTime"`
|
|
|
- ExpireTime string `json:"ExpireTime" xml:"ExpireTime"`
|
|
|
- AntiHarassStartTime int `json:"AntiHarassStartTime" xml:"AntiHarassStartTime"`
|
|
|
- AntiHarassDuration int `json:"AntiHarassDuration" xml:"AntiHarassDuration"`
|
|
|
- StoreOffline bool `json:"StoreOffline" xml:"StoreOffline"`
|
|
|
- BatchNumber string `json:"BatchNumber" xml:"BatchNumber"`
|
|
|
- ProvinceId string `json:"ProvinceId" xml:"ProvinceId"`
|
|
|
- IOSApnsEnv string `json:"iOSApnsEnv" xml:"iOSApnsEnv"`
|
|
|
- IOSRemind bool `json:"iOSRemind" xml:"iOSRemind"`
|
|
|
- IOSRemindBody string `json:"iOSRemindBody" xml:"iOSRemindBody"`
|
|
|
- IOSBadge int `json:"iOSBadge" xml:"iOSBadge"`
|
|
|
- IOSMusic string `json:"iOSMusic" xml:"iOSMusic"`
|
|
|
- IOSSubtitle string `json:"iOSSubtitle" xml:"iOSSubtitle"`
|
|
|
- IOSNotificationCategory string `json:"iOSNotificationCategory" xml:"iOSNotificationCategory"`
|
|
|
- IOSMutableContent bool `json:"iOSMutableContent" xml:"iOSMutableContent"`
|
|
|
- IOSExtParameters string `json:"iOSExtParameters" xml:"iOSExtParameters"`
|
|
|
- AndroidNotifyType string `json:"AndroidNotifyType" xml:"AndroidNotifyType"`
|
|
|
- AndroidOpenType string `json:"AndroidOpenType" xml:"AndroidOpenType"`
|
|
|
- AndroidActivity string `json:"AndroidActivity" xml:"AndroidActivity"`
|
|
|
- AndroidMusic string `json:"AndroidMusic" xml:"AndroidMusic"`
|
|
|
- AndroidOpenUrl string `json:"AndroidOpenUrl" xml:"AndroidOpenUrl"`
|
|
|
- AndroidXiaoMiActivity string `json:"AndroidXiaoMiActivity" xml:"AndroidXiaoMiActivity"`
|
|
|
- AndroidXiaoMiNotifyTitle string `json:"AndroidXiaoMiNotifyTitle" xml:"AndroidXiaoMiNotifyTitle"`
|
|
|
- AndroidXiaoMiNotifyBody string `json:"AndroidXiaoMiNotifyBody" xml:"AndroidXiaoMiNotifyBody"`
|
|
|
- AndroidPopupActivity string `json:"AndroidPopupActivity" xml:"AndroidPopupActivity"`
|
|
|
- AndroidPopupTitle string `json:"AndroidPopupTitle" xml:"AndroidPopupTitle"`
|
|
|
- AndroidPopupBody string `json:"AndroidPopupBody" xml:"AndroidPopupBody"`
|
|
|
- AndroidNotificationBarType int `json:"AndroidNotificationBarType" xml:"AndroidNotificationBarType"`
|
|
|
- AndroidNotificationBarPriority int `json:"AndroidNotificationBarPriority" xml:"AndroidNotificationBarPriority"`
|
|
|
- AndroidExtParameters string `json:"AndroidExtParameters" xml:"AndroidExtParameters"`
|
|
|
- SmsTemplateName string `json:"SmsTemplateName" xml:"SmsTemplateName"`
|
|
|
- SmsSignName string `json:"SmsSignName" xml:"SmsSignName"`
|
|
|
- SmsParams string `json:"SmsParams" xml:"SmsParams"`
|
|
|
- SmsDelaySecs int `json:"SmsDelaySecs" xml:"SmsDelaySecs"`
|
|
|
- SmsSendPolicy int `json:"SmsSendPolicy" xml:"SmsSendPolicy"`
|
|
|
-}
|
|
|
-
|
|
|
-// CreateQueryPushDetailRequest creates a request to invoke QueryPushDetail API
|
|
|
-func CreateQueryPushDetailRequest() (request *QueryPushDetailRequest) {
|
|
|
- request = &QueryPushDetailRequest{
|
|
|
- RpcRequest: &requests.RpcRequest{},
|
|
|
- }
|
|
|
- request.InitWithApiInfo("Push", "2016-08-01", "QueryPushDetail", "", "")
|
|
|
- return
|
|
|
-}
|
|
|
-
|
|
|
-// CreateQueryPushDetailResponse creates a response to parse from QueryPushDetail response
|
|
|
-func CreateQueryPushDetailResponse() (response *QueryPushDetailResponse) {
|
|
|
- response = &QueryPushDetailResponse{
|
|
|
- BaseResponse: &responses.BaseResponse{},
|
|
|
- }
|
|
|
- return
|
|
|
-}
|