Browse Source

由丰鲁成发起的CLOUDPHOTO SDK自动发布, BUILD_ID=484, 版本号:1.2.7

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao 7 năm trước cách đây
mục cha
commit
893e53f891

+ 4 - 0
ChangeLog.txt

@@ -1,3 +1,7 @@
+2018-03-20 Version: 1.2.7
+1, add FetchAlbumTagPhotos
+2, CreatePhoto add optional param TakenAt
+
 2018-03-16 Version: 1.2.6
 1, Update GetQuotaInstance API.
 

+ 1 - 0
services/cloudphoto/create_photo.go

@@ -85,6 +85,7 @@ type CreatePhotoRequest struct {
 	LibraryId       string           `position:"Query" name:"LibraryId"`
 	Staging         string           `position:"Query" name:"Staging"`
 	ShareExpireTime requests.Integer `position:"Query" name:"ShareExpireTime"`
+	TakenAt         requests.Integer `position:"Query" name:"TakenAt"`
 }
 
 // CreatePhotoResponse is the response struct for api CreatePhoto

+ 113 - 0
services/cloudphoto/fetch_album_tag_photos.go

@@ -0,0 +1,113 @@
+package cloudphoto
+
+//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"
+)
+
+// FetchAlbumTagPhotos invokes the cloudphoto.FetchAlbumTagPhotos API synchronously
+// api document: https://help.aliyun.com/api/cloudphoto/fetchalbumtagphotos.html
+func (client *Client) FetchAlbumTagPhotos(request *FetchAlbumTagPhotosRequest) (response *FetchAlbumTagPhotosResponse, err error) {
+	response = CreateFetchAlbumTagPhotosResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// FetchAlbumTagPhotosWithChan invokes the cloudphoto.FetchAlbumTagPhotos API asynchronously
+// api document: https://help.aliyun.com/api/cloudphoto/fetchalbumtagphotos.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) FetchAlbumTagPhotosWithChan(request *FetchAlbumTagPhotosRequest) (<-chan *FetchAlbumTagPhotosResponse, <-chan error) {
+	responseChan := make(chan *FetchAlbumTagPhotosResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.FetchAlbumTagPhotos(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// FetchAlbumTagPhotosWithCallback invokes the cloudphoto.FetchAlbumTagPhotos API asynchronously
+// api document: https://help.aliyun.com/api/cloudphoto/fetchalbumtagphotos.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) FetchAlbumTagPhotosWithCallback(request *FetchAlbumTagPhotosRequest, callback func(response *FetchAlbumTagPhotosResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *FetchAlbumTagPhotosResponse
+		var err error
+		defer close(result)
+		response, err = client.FetchAlbumTagPhotos(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// FetchAlbumTagPhotosRequest is the request struct for api FetchAlbumTagPhotos
+type FetchAlbumTagPhotosRequest struct {
+	*requests.RpcRequest
+	AlbumId   requests.Integer `position:"Query" name:"AlbumId"`
+	TagId     requests.Integer `position:"Query" name:"TagId"`
+	Size      requests.Integer `position:"Query" name:"Size"`
+	Page      requests.Integer `position:"Query" name:"Page"`
+	StoreName string           `position:"Query" name:"StoreName"`
+	LibraryId string           `position:"Query" name:"LibraryId"`
+}
+
+// FetchAlbumTagPhotosResponse is the response struct for api FetchAlbumTagPhotos
+type FetchAlbumTagPhotosResponse struct {
+	*responses.BaseResponse
+	Code       string   `json:"Code" xml:"Code"`
+	Message    string   `json:"Message" xml:"Message"`
+	TotalCount int      `json:"TotalCount" xml:"TotalCount"`
+	RequestId  string   `json:"RequestId" xml:"RequestId"`
+	Action     string   `json:"Action" xml:"Action"`
+	Results    []Result `json:"Results" xml:"Results"`
+}
+
+// CreateFetchAlbumTagPhotosRequest creates a request to invoke FetchAlbumTagPhotos API
+func CreateFetchAlbumTagPhotosRequest() (request *FetchAlbumTagPhotosRequest) {
+	request = &FetchAlbumTagPhotosRequest{
+		RpcRequest: &requests.RpcRequest{},
+	}
+	request.InitWithApiInfo("CloudPhoto", "2017-07-11", "FetchAlbumTagPhotos", "cloudphoto", "openAPI")
+	return
+}
+
+// CreateFetchAlbumTagPhotosResponse creates a response to parse from FetchAlbumTagPhotos response
+func CreateFetchAlbumTagPhotosResponse() (response *FetchAlbumTagPhotosResponse) {
+	response = &FetchAlbumTagPhotosResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 6 - 6
services/cloudphoto/struct_album.go

@@ -17,13 +17,13 @@ package cloudphoto
 
 // Album is a nested struct in cloudphoto response
 type Album struct {
-	Mtime       int    `json:"Mtime" xml:"Mtime"`
-	Ctime       int    `json:"Ctime" xml:"Ctime"`
-	IdStr       string `json:"IdStr" xml:"IdStr"`
 	Name        string `json:"Name" xml:"Name"`
-	Id          int    `json:"Id" xml:"Id"`
-	Remark      string `json:"Remark" xml:"Remark"`
-	PhotosCount int    `json:"PhotosCount" xml:"PhotosCount"`
+	IdStr       string `json:"IdStr" xml:"IdStr"`
+	Ctime       int    `json:"Ctime" xml:"Ctime"`
 	State       string `json:"State" xml:"State"`
+	PhotosCount int    `json:"PhotosCount" xml:"PhotosCount"`
+	Mtime       int    `json:"Mtime" xml:"Mtime"`
+	Remark      string `json:"Remark" xml:"Remark"`
+	Id          int    `json:"Id" xml:"Id"`
 	Cover       Cover  `json:"Cover" xml:"Cover"`
 }

+ 1 - 1
services/cloudphoto/struct_bucket.go

@@ -18,7 +18,7 @@ package cloudphoto
 // Bucket is a nested struct in cloudphoto response
 type Bucket struct {
 	Name   string `json:"Name" xml:"Name"`
+	Region string `json:"Region" xml:"Region"`
 	State  string `json:"State" xml:"State"`
 	Acl    string `json:"Acl" xml:"Acl"`
-	Region string `json:"Region" xml:"Region"`
 }

+ 7 - 7
services/cloudphoto/struct_cover.go

@@ -17,16 +17,16 @@ package cloudphoto
 
 // Cover is a nested struct in cloudphoto response
 type Cover struct {
-	Mtime   int    `json:"Mtime" xml:"Mtime"`
 	FileId  string `json:"FileId" xml:"FileId"`
-	Ctime   int    `json:"Ctime" xml:"Ctime"`
-	Width   int    `json:"Width" xml:"Width"`
-	IdStr   string `json:"IdStr" xml:"IdStr"`
 	IsVideo bool   `json:"IsVideo" xml:"IsVideo"`
-	Id      int    `json:"Id" xml:"Id"`
-	Remark  string `json:"Remark" xml:"Remark"`
-	Md5     string `json:"Md5" xml:"Md5"`
+	IdStr   string `json:"IdStr" xml:"IdStr"`
+	Ctime   int    `json:"Ctime" xml:"Ctime"`
 	State   string `json:"State" xml:"State"`
 	Title   string `json:"Title" xml:"Title"`
+	Remark  string `json:"Remark" xml:"Remark"`
+	Mtime   int    `json:"Mtime" xml:"Mtime"`
+	Md5     string `json:"Md5" xml:"Md5"`
+	Width   int    `json:"Width" xml:"Width"`
+	Id      int    `json:"Id" xml:"Id"`
 	Height  int    `json:"Height" xml:"Height"`
 }

+ 11 - 11
services/cloudphoto/struct_event.go

@@ -17,19 +17,19 @@ package cloudphoto
 
 // Event is a nested struct in cloudphoto response
 type Event struct {
-	WatermarkPhotoId string `json:"WatermarkPhotoId" xml:"WatermarkPhotoId"`
-	WeixinTitle      string `json:"WeixinTitle" xml:"WeixinTitle"`
+	IdStr            string `json:"IdStr" xml:"IdStr"`
+	Ctime            int    `json:"Ctime" xml:"Ctime"`
+	Title            string `json:"Title" xml:"Title"`
 	SplashPhotoId    string `json:"SplashPhotoId" xml:"SplashPhotoId"`
-	EndAt            int    `json:"EndAt" xml:"EndAt"`
+	Id               int    `json:"Id" xml:"Id"`
+	BannerPhotoId    string `json:"BannerPhotoId" xml:"BannerPhotoId"`
+	WeixinTitle      string `json:"WeixinTitle" xml:"WeixinTitle"`
+	Identity         string `json:"Identity" xml:"Identity"`
 	State            string `json:"State" xml:"State"`
-	LibraryId        string `json:"LibraryId" xml:"LibraryId"`
-	ViewsCount       int    `json:"ViewsCount" xml:"ViewsCount"`
-	Title            string `json:"Title" xml:"Title"`
+	EndAt            int    `json:"EndAt" xml:"EndAt"`
 	Mtime            int    `json:"Mtime" xml:"Mtime"`
+	ViewsCount       int    `json:"ViewsCount" xml:"ViewsCount"`
+	LibraryId        string `json:"LibraryId" xml:"LibraryId"`
+	WatermarkPhotoId string `json:"WatermarkPhotoId" xml:"WatermarkPhotoId"`
 	StartAt          int    `json:"StartAt" xml:"StartAt"`
-	Identity         string `json:"Identity" xml:"Identity"`
-	Ctime            int    `json:"Ctime" xml:"Ctime"`
-	IdStr            string `json:"IdStr" xml:"IdStr"`
-	Id               int    `json:"Id" xml:"Id"`
-	BannerPhotoId    string `json:"BannerPhotoId" xml:"BannerPhotoId"`
 }

+ 6 - 6
services/cloudphoto/struct_face.go

@@ -18,16 +18,16 @@ package cloudphoto
 // Face is a nested struct in cloudphoto response
 type Face struct {
 	Name        string   `json:"Name" xml:"Name"`
+	FaceIdStr   string   `json:"FaceIdStr" xml:"FaceIdStr"`
+	IdStr       string   `json:"IdStr" xml:"IdStr"`
+	Ctime       int      `json:"Ctime" xml:"Ctime"`
+	IsMe        bool     `json:"IsMe" xml:"IsMe"`
 	FaceId      int      `json:"FaceId" xml:"FaceId"`
+	Id          int      `json:"Id" xml:"Id"`
+	FaceName    string   `json:"FaceName" xml:"FaceName"`
 	State       string   `json:"State" xml:"State"`
 	PhotosCount int      `json:"PhotosCount" xml:"PhotosCount"`
-	FaceName    string   `json:"FaceName" xml:"FaceName"`
-	IsMe        bool     `json:"IsMe" xml:"IsMe"`
 	Mtime       int      `json:"Mtime" xml:"Mtime"`
-	Ctime       int      `json:"Ctime" xml:"Ctime"`
-	IdStr       string   `json:"IdStr" xml:"IdStr"`
-	Id          int      `json:"Id" xml:"Id"`
-	FaceIdStr   string   `json:"FaceIdStr" xml:"FaceIdStr"`
 	Axis        []string `json:"Axis" xml:"Axis"`
 	Cover       Cover    `json:"Cover" xml:"Cover"`
 }

+ 13 - 13
services/cloudphoto/struct_photo.go

@@ -18,21 +18,21 @@ package cloudphoto
 // Photo is a nested struct in cloudphoto response
 type Photo struct {
 	FileId          string `json:"FileId" xml:"FileId"`
-	Width           int    `json:"Width" xml:"Width"`
-	State           string `json:"State" xml:"State"`
-	Md5             string `json:"Md5" xml:"Md5"`
-	Title           string `json:"Title" xml:"Title"`
-	Height          int    `json:"Height" xml:"Height"`
-	Mtime           int    `json:"Mtime" xml:"Mtime"`
-	TakenAt         int    `json:"TakenAt" xml:"TakenAt"`
-	Ctime           int    `json:"Ctime" xml:"Ctime"`
 	IdStr           string `json:"IdStr" xml:"IdStr"`
-	Location        string `json:"Location" xml:"Location"`
-	IsVideo         bool   `json:"IsVideo" xml:"IsVideo"`
+	Ctime           int    `json:"Ctime" xml:"Ctime"`
+	Title           string `json:"Title" xml:"Title"`
+	Remark          string `json:"Remark" xml:"Remark"`
 	Like            int    `json:"Like" xml:"Like"`
 	Id              int    `json:"Id" xml:"Id"`
-	Size            int    `json:"Size" xml:"Size"`
-	Remark          string `json:"Remark" xml:"Remark"`
-	InactiveTime    int    `json:"InactiveTime" xml:"InactiveTime"`
 	ShareExpireTime int    `json:"ShareExpireTime" xml:"ShareExpireTime"`
+	InactiveTime    int    `json:"InactiveTime" xml:"InactiveTime"`
+	Location        string `json:"Location" xml:"Location"`
+	Height          int    `json:"Height" xml:"Height"`
+	IsVideo         bool   `json:"IsVideo" xml:"IsVideo"`
+	State           string `json:"State" xml:"State"`
+	Mtime           int    `json:"Mtime" xml:"Mtime"`
+	Md5             string `json:"Md5" xml:"Md5"`
+	Width           int    `json:"Width" xml:"Width"`
+	Size            int    `json:"Size" xml:"Size"`
+	TakenAt         int    `json:"TakenAt" xml:"TakenAt"`
 }

+ 6 - 6
services/cloudphoto/struct_photo_store.go

@@ -17,15 +17,15 @@ package cloudphoto
 
 // PhotoStore is a nested struct in cloudphoto response
 type PhotoStore struct {
-	Mtime             int      `json:"Mtime" xml:"Mtime"`
-	DefaultQuota      int      `json:"DefaultQuota" xml:"DefaultQuota"`
-	AutoCleanDays     int      `json:"AutoCleanDays" xml:"AutoCleanDays"`
+	Name              string   `json:"Name" xml:"Name"`
+	IdStr             string   `json:"IdStr" xml:"IdStr"`
 	Ctime             int      `json:"Ctime" xml:"Ctime"`
 	AutoCleanEnabled  bool     `json:"AutoCleanEnabled" xml:"AutoCleanEnabled"`
-	IdStr             string   `json:"IdStr" xml:"IdStr"`
-	Name              string   `json:"Name" xml:"Name"`
-	Id                int      `json:"Id" xml:"Id"`
+	DefaultQuota      int      `json:"DefaultQuota" xml:"DefaultQuota"`
 	Remark            string   `json:"Remark" xml:"Remark"`
+	Mtime             int      `json:"Mtime" xml:"Mtime"`
 	DefaultTrashQuota int      `json:"DefaultTrashQuota" xml:"DefaultTrashQuota"`
+	Id                int      `json:"Id" xml:"Id"`
+	AutoCleanDays     int      `json:"AutoCleanDays" xml:"AutoCleanDays"`
 	Buckets           []Bucket `json:"Buckets" xml:"Buckets"`
 }

+ 5 - 5
services/cloudphoto/struct_quota.go

@@ -17,12 +17,12 @@ package cloudphoto
 
 // Quota is a nested struct in cloudphoto response
 type Quota struct {
-	InactiveSize    int `json:"InactiveSize" xml:"InactiveSize"`
-	TotalQuota      int `json:"TotalQuota" xml:"TotalQuota"`
-	ActiveSize      int `json:"ActiveSize" xml:"ActiveSize"`
-	VideosCount     int `json:"VideosCount" xml:"VideosCount"`
 	TotalTrashQuota int `json:"TotalTrashQuota" xml:"TotalTrashQuota"`
+	ActiveSize      int `json:"ActiveSize" xml:"ActiveSize"`
+	UsedQuota       int `json:"UsedQuota" xml:"UsedQuota"`
+	InactiveSize    int `json:"InactiveSize" xml:"InactiveSize"`
 	PhotosCount     int `json:"PhotosCount" xml:"PhotosCount"`
 	FacesCount      int `json:"FacesCount" xml:"FacesCount"`
-	UsedQuota       int `json:"UsedQuota" xml:"UsedQuota"`
+	VideosCount     int `json:"VideosCount" xml:"VideosCount"`
+	TotalQuota      int `json:"TotalQuota" xml:"TotalQuota"`
 }

+ 6 - 5
services/cloudphoto/struct_result.go

@@ -18,14 +18,15 @@ package cloudphoto
 // Result is a nested struct in cloudphoto response
 type Result struct {
 	AccessUrl      string `json:"AccessUrl" xml:"AccessUrl"`
+	FramedPhotoUrl string `json:"FramedPhotoUrl" xml:"FramedPhotoUrl"`
 	IdStr          string `json:"IdStr" xml:"IdStr"`
 	Message        string `json:"Message" xml:"Message"`
-	ThumbnailUrl   string `json:"ThumbnailUrl" xml:"ThumbnailUrl"`
-	Id             int    `json:"Id" xml:"Id"`
-	PhotoId        int    `json:"PhotoId" xml:"PhotoId"`
+	PhotoIdStr     string `json:"PhotoIdStr" xml:"PhotoIdStr"`
 	State          string `json:"State" xml:"State"`
 	Code           string `json:"Code" xml:"Code"`
-	PhotoIdStr     string `json:"PhotoIdStr" xml:"PhotoIdStr"`
+	Mtime          int    `json:"Mtime" xml:"Mtime"`
+	Id             int    `json:"Id" xml:"Id"`
+	ThumbnailUrl   string `json:"ThumbnailUrl" xml:"ThumbnailUrl"`
 	DownloadUrl    string `json:"DownloadUrl" xml:"DownloadUrl"`
-	FramedPhotoUrl string `json:"FramedPhotoUrl" xml:"FramedPhotoUrl"`
+	PhotoId        int    `json:"PhotoId" xml:"PhotoId"`
 }

+ 21 - 0
services/cloudphoto/struct_results_in_fetch_album_tag_photos.go

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

+ 2 - 2
services/cloudphoto/struct_tag.go

@@ -17,10 +17,10 @@ package cloudphoto
 
 // Tag is a nested struct in cloudphoto response
 type Tag struct {
-	IsSubTag  bool   `json:"IsSubTag" xml:"IsSubTag"`
+	Name      string `json:"Name" xml:"Name"`
 	ParentTag string `json:"ParentTag" xml:"ParentTag"`
 	IdStr     string `json:"IdStr" xml:"IdStr"`
-	Name      string `json:"Name" xml:"Name"`
 	Id        int    `json:"Id" xml:"Id"`
+	IsSubTag  bool   `json:"IsSubTag" xml:"IsSubTag"`
 	Cover     Cover  `json:"Cover" xml:"Cover"`
 }