Browse Source

由释一发起的PUSH SDK自动发布, BUILD_ID=490, 版本号:1.4.0

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao 7 years ago
parent
commit
44ce83f14b

+ 4 - 0
ChangeLog.txt

@@ -1,3 +1,7 @@
+2018-03-23 Version: 1.4.0
+1, Add 'QueryDevicesByAccount' and 'QueryDevicesByAlias'  Api.
+2, Remove 'QueryPushDetail' Api.
+
 2018-03-20 Version: 1.2.7
 1, add FetchAlbumTagPhotos
 2, CreatePhoto add optional param TakenAt

+ 105 - 0
services/push/query_devices_by_account.go

@@ -0,0 +1,105 @@
+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"
+)
+
+// QueryDevicesByAccount invokes the push.QueryDevicesByAccount API synchronously
+// api document: https://help.aliyun.com/api/push/querydevicesbyaccount.html
+func (client *Client) QueryDevicesByAccount(request *QueryDevicesByAccountRequest) (response *QueryDevicesByAccountResponse, err error) {
+	response = CreateQueryDevicesByAccountResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDevicesByAccountWithChan invokes the push.QueryDevicesByAccount API asynchronously
+// api document: https://help.aliyun.com/api/push/querydevicesbyaccount.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDevicesByAccountWithChan(request *QueryDevicesByAccountRequest) (<-chan *QueryDevicesByAccountResponse, <-chan error) {
+	responseChan := make(chan *QueryDevicesByAccountResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDevicesByAccount(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDevicesByAccountWithCallback invokes the push.QueryDevicesByAccount API asynchronously
+// api document: https://help.aliyun.com/api/push/querydevicesbyaccount.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDevicesByAccountWithCallback(request *QueryDevicesByAccountRequest, callback func(response *QueryDevicesByAccountResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDevicesByAccountResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDevicesByAccount(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDevicesByAccountRequest is the request struct for api QueryDevicesByAccount
+type QueryDevicesByAccountRequest struct {
+	*requests.RpcRequest
+	AppKey  requests.Integer `position:"Query" name:"AppKey"`
+	Account string           `position:"Query" name:"Account"`
+}
+
+// QueryDevicesByAccountResponse is the response struct for api QueryDevicesByAccount
+type QueryDevicesByAccountResponse struct {
+	*responses.BaseResponse
+	RequestId string                           `json:"RequestId" xml:"RequestId"`
+	DeviceIds DeviceIdsInQueryDevicesByAccount `json:"DeviceIds" xml:"DeviceIds"`
+}
+
+// CreateQueryDevicesByAccountRequest creates a request to invoke QueryDevicesByAccount API
+func CreateQueryDevicesByAccountRequest() (request *QueryDevicesByAccountRequest) {
+	request = &QueryDevicesByAccountRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Push", "2016-08-01", "QueryDevicesByAccount", "", "")
+	return
+}
+
+// CreateQueryDevicesByAccountResponse creates a response to parse from QueryDevicesByAccount response
+func CreateQueryDevicesByAccountResponse() (response *QueryDevicesByAccountResponse) {
+	response = &QueryDevicesByAccountResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 105 - 0
services/push/query_devices_by_alias.go

@@ -0,0 +1,105 @@
+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"
+)
+
+// QueryDevicesByAlias invokes the push.QueryDevicesByAlias API synchronously
+// api document: https://help.aliyun.com/api/push/querydevicesbyalias.html
+func (client *Client) QueryDevicesByAlias(request *QueryDevicesByAliasRequest) (response *QueryDevicesByAliasResponse, err error) {
+	response = CreateQueryDevicesByAliasResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// QueryDevicesByAliasWithChan invokes the push.QueryDevicesByAlias API asynchronously
+// api document: https://help.aliyun.com/api/push/querydevicesbyalias.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDevicesByAliasWithChan(request *QueryDevicesByAliasRequest) (<-chan *QueryDevicesByAliasResponse, <-chan error) {
+	responseChan := make(chan *QueryDevicesByAliasResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.QueryDevicesByAlias(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// QueryDevicesByAliasWithCallback invokes the push.QueryDevicesByAlias API asynchronously
+// api document: https://help.aliyun.com/api/push/querydevicesbyalias.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) QueryDevicesByAliasWithCallback(request *QueryDevicesByAliasRequest, callback func(response *QueryDevicesByAliasResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *QueryDevicesByAliasResponse
+		var err error
+		defer close(result)
+		response, err = client.QueryDevicesByAlias(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// QueryDevicesByAliasRequest is the request struct for api QueryDevicesByAlias
+type QueryDevicesByAliasRequest struct {
+	*requests.RpcRequest
+	AppKey requests.Integer `position:"Query" name:"AppKey"`
+	Alias  string           `position:"Query" name:"Alias"`
+}
+
+// QueryDevicesByAliasResponse is the response struct for api QueryDevicesByAlias
+type QueryDevicesByAliasResponse struct {
+	*responses.BaseResponse
+	RequestId string                         `json:"RequestId" xml:"RequestId"`
+	DeviceIds DeviceIdsInQueryDevicesByAlias `json:"DeviceIds" xml:"DeviceIds"`
+}
+
+// CreateQueryDevicesByAliasRequest creates a request to invoke QueryDevicesByAlias API
+func CreateQueryDevicesByAliasRequest() (request *QueryDevicesByAliasRequest) {
+	request = &QueryDevicesByAliasRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("Push", "2016-08-01", "QueryDevicesByAlias", "", "")
+	return
+}
+
+// CreateQueryDevicesByAliasResponse creates a response to parse from QueryDevicesByAlias response
+func CreateQueryDevicesByAliasResponse() (response *QueryDevicesByAliasResponse) {
+	response = &QueryDevicesByAliasResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 0 - 146
services/push/query_push_detail.go

@@ -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
-}

+ 21 - 0
services/push/struct_device_ids_in_query_devices_by_account.go

@@ -0,0 +1,21 @@
+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.
+
+// DeviceIdsInQueryDevicesByAccount is a nested struct in push response
+type DeviceIdsInQueryDevicesByAccount struct {
+	DeviceId []string `json:"DeviceId" xml:"DeviceId"`
+}

+ 21 - 0
services/push/struct_device_ids_in_query_devices_by_alias.go

@@ -0,0 +1,21 @@
+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.
+
+// DeviceIdsInQueryDevicesByAlias is a nested struct in push response
+type DeviceIdsInQueryDevicesByAlias struct {
+	DeviceId []string `json:"DeviceId" xml:"DeviceId"`
+}

+ 5 - 5
services/push/struct_push_message_info.go

@@ -17,12 +17,12 @@ package push
 
 // PushMessageInfo is a nested struct in push response
 type PushMessageInfo struct {
-	Body       string `json:"Body" xml:"Body"`
-	Type       string `json:"Type" xml:"Type"`
-	PushTime   string `json:"PushTime" xml:"PushTime"`
 	MessageId  string `json:"MessageId" xml:"MessageId"`
-	AppName    string `json:"AppName" xml:"AppName"`
+	PushTime   string `json:"PushTime" xml:"PushTime"`
 	Title      string `json:"Title" xml:"Title"`
-	DeviceType string `json:"DeviceType" xml:"DeviceType"`
 	AppKey     int    `json:"AppKey" xml:"AppKey"`
+	DeviceType string `json:"DeviceType" xml:"DeviceType"`
+	Body       string `json:"Body" xml:"Body"`
+	AppName    string `json:"AppName" xml:"AppName"`
+	Type       string `json:"Type" xml:"Type"`
 }