Explorar o código

IMAGESEARCH SDK Auto Released By hq90172,Version:1.55.0

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
haowei.yao %!s(int64=6) %!d(string=hai) anos
pai
achega
f7dd473bdc

+ 4 - 0
ChangeLog.txt

@@ -1,3 +1,7 @@
+2019-04-11 Version: 1.55.0
+1, Release AddImage/SearchImage/DeleteImage OpenApi.
+2, Add 'SearchByName' feature to SearchImage
+
 2019-04-10 Version: 1.54.1
 1, Modify DescribeBackupGatewayList DBS interface.
 

+ 117 - 0
services/imagesearch/add_image.go

@@ -0,0 +1,117 @@
+package imagesearch
+
+//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"
+)
+
+// AddImage invokes the imagesearch.AddImage API synchronously
+// api document: https://help.aliyun.com/api/imagesearch/addimage.html
+func (client *Client) AddImage(request *AddImageRequest) (response *AddImageResponse, err error) {
+	response = CreateAddImageResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// AddImageWithChan invokes the imagesearch.AddImage API asynchronously
+// api document: https://help.aliyun.com/api/imagesearch/addimage.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) AddImageWithChan(request *AddImageRequest) (<-chan *AddImageResponse, <-chan error) {
+	responseChan := make(chan *AddImageResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.AddImage(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// AddImageWithCallback invokes the imagesearch.AddImage API asynchronously
+// api document: https://help.aliyun.com/api/imagesearch/addimage.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) AddImageWithCallback(request *AddImageRequest, callback func(response *AddImageResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *AddImageResponse
+		var err error
+		defer close(result)
+		response, err = client.AddImage(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// AddImageRequest is the request struct for api AddImage
+type AddImageRequest struct {
+	*requests.RoaRequest
+	PicContent    string           `position:"Body" name:"PicContent"`
+	StrAttr       string           `position:"Body" name:"StrAttr"`
+	InstanceName  string           `position:"Body" name:"InstanceName"`
+	IntAttr       requests.Integer `position:"Body" name:"IntAttr"`
+	ProductId     string           `position:"Body" name:"ProductId"`
+	PicName       string           `position:"Body" name:"PicName"`
+	CustomContent string           `position:"Body" name:"CustomContent"`
+	Region        string           `position:"Body" name:"Region"`
+	CategoryId    requests.Integer `position:"Body" name:"CategoryId"`
+	Crop          requests.Boolean `position:"Body" name:"Crop"`
+}
+
+// AddImageResponse is the response struct for api AddImage
+type AddImageResponse struct {
+	*responses.BaseResponse
+	RequestId string  `json:"RequestId" xml:"RequestId"`
+	Success   bool    `json:"Success" xml:"Success"`
+	Message   string  `json:"Message" xml:"Message"`
+	Code      int     `json:"Code" xml:"Code"`
+	PicInfo   PicInfo `json:"PicInfo" xml:"PicInfo"`
+}
+
+// CreateAddImageRequest creates a request to invoke AddImage API
+func CreateAddImageRequest() (request *AddImageRequest) {
+	request = &AddImageRequest{
+		RoaRequest: &requests.RoaRequest{},
+	}
+	request.InitWithApiInfo("ImageSearch", "2019-03-25", "AddImage", "/v2/image/add", "imagesearch", "openAPI")
+	request.Method = requests.POST
+	return
+}
+
+// CreateAddImageResponse creates a response to parse from AddImage response
+func CreateAddImageResponse() (response *AddImageResponse) {
+	response = &AddImageResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 0 - 107
services/imagesearch/add_item.go

@@ -1,107 +0,0 @@
-package imagesearch
-
-//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"
-)
-
-// AddItem invokes the imagesearch.AddItem API synchronously
-// api document: https://help.aliyun.com/api/imagesearch/additem.html
-func (client *Client) AddItem(request *AddItemRequest) (response *AddItemResponse, err error) {
-	response = CreateAddItemResponse()
-	err = client.DoAction(request, response)
-	return
-}
-
-// AddItemWithChan invokes the imagesearch.AddItem API asynchronously
-// api document: https://help.aliyun.com/api/imagesearch/additem.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) AddItemWithChan(request *AddItemRequest) (<-chan *AddItemResponse, <-chan error) {
-	responseChan := make(chan *AddItemResponse, 1)
-	errChan := make(chan error, 1)
-	err := client.AddAsyncTask(func() {
-		defer close(responseChan)
-		defer close(errChan)
-		response, err := client.AddItem(request)
-		if err != nil {
-			errChan <- err
-		} else {
-			responseChan <- response
-		}
-	})
-	if err != nil {
-		errChan <- err
-		close(responseChan)
-		close(errChan)
-	}
-	return responseChan, errChan
-}
-
-// AddItemWithCallback invokes the imagesearch.AddItem API asynchronously
-// api document: https://help.aliyun.com/api/imagesearch/additem.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) AddItemWithCallback(request *AddItemRequest, callback func(response *AddItemResponse, err error)) <-chan int {
-	result := make(chan int, 1)
-	err := client.AddAsyncTask(func() {
-		var response *AddItemResponse
-		var err error
-		defer close(result)
-		response, err = client.AddItem(request)
-		callback(response, err)
-		result <- 1
-	})
-	if err != nil {
-		defer close(result)
-		callback(nil, err)
-		result <- 0
-	}
-	return result
-}
-
-// AddItemRequest is the request struct for api AddItem
-type AddItemRequest struct {
-	*requests.RoaRequest
-	InstanceName string `position:"Query" name:"instanceName"`
-}
-
-// AddItemResponse is the response struct for api AddItem
-type AddItemResponse struct {
-	*responses.BaseResponse
-	RequestId string `json:"RequestId" xml:"RequestId"`
-	Success   bool   `json:"Success" xml:"Success"`
-	Message   string `json:"Message" xml:"Message"`
-	Code      int    `json:"Code" xml:"Code"`
-}
-
-// CreateAddItemRequest creates a request to invoke AddItem API
-func CreateAddItemRequest() (request *AddItemRequest) {
-	request = &AddItemRequest{
-		RoaRequest: &requests.RoaRequest{},
-	}
-	request.InitWithApiInfo("ImageSearch", "2018-01-20", "AddItem", "/item/add", "imagesearch", "openAPI")
-	request.Method = requests.POST
-	return
-}
-
-// CreateAddItemResponse creates a response to parse from AddItem response
-func CreateAddItemResponse() (response *AddItemResponse) {
-	response = &AddItemResponse{
-		BaseResponse: &responses.BaseResponse{},
-	}
-	return
-}

+ 28 - 26
services/imagesearch/delete_item.go → services/imagesearch/delete_image.go

@@ -20,24 +20,24 @@ import (
 	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
 )
 
-// DeleteItem invokes the imagesearch.DeleteItem API synchronously
-// api document: https://help.aliyun.com/api/imagesearch/deleteitem.html
-func (client *Client) DeleteItem(request *DeleteItemRequest) (response *DeleteItemResponse, err error) {
-	response = CreateDeleteItemResponse()
+// DeleteImage invokes the imagesearch.DeleteImage API synchronously
+// api document: https://help.aliyun.com/api/imagesearch/deleteimage.html
+func (client *Client) DeleteImage(request *DeleteImageRequest) (response *DeleteImageResponse, err error) {
+	response = CreateDeleteImageResponse()
 	err = client.DoAction(request, response)
 	return
 }
 
-// DeleteItemWithChan invokes the imagesearch.DeleteItem API asynchronously
-// api document: https://help.aliyun.com/api/imagesearch/deleteitem.html
+// DeleteImageWithChan invokes the imagesearch.DeleteImage API asynchronously
+// api document: https://help.aliyun.com/api/imagesearch/deleteimage.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) DeleteItemWithChan(request *DeleteItemRequest) (<-chan *DeleteItemResponse, <-chan error) {
-	responseChan := make(chan *DeleteItemResponse, 1)
+func (client *Client) DeleteImageWithChan(request *DeleteImageRequest) (<-chan *DeleteImageResponse, <-chan error) {
+	responseChan := make(chan *DeleteImageResponse, 1)
 	errChan := make(chan error, 1)
 	err := client.AddAsyncTask(func() {
 		defer close(responseChan)
 		defer close(errChan)
-		response, err := client.DeleteItem(request)
+		response, err := client.DeleteImage(request)
 		if err != nil {
 			errChan <- err
 		} else {
@@ -52,16 +52,16 @@ func (client *Client) DeleteItemWithChan(request *DeleteItemRequest) (<-chan *De
 	return responseChan, errChan
 }
 
-// DeleteItemWithCallback invokes the imagesearch.DeleteItem API asynchronously
-// api document: https://help.aliyun.com/api/imagesearch/deleteitem.html
+// DeleteImageWithCallback invokes the imagesearch.DeleteImage API asynchronously
+// api document: https://help.aliyun.com/api/imagesearch/deleteimage.html
 // asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) DeleteItemWithCallback(request *DeleteItemRequest, callback func(response *DeleteItemResponse, err error)) <-chan int {
+func (client *Client) DeleteImageWithCallback(request *DeleteImageRequest, callback func(response *DeleteImageResponse, err error)) <-chan int {
 	result := make(chan int, 1)
 	err := client.AddAsyncTask(func() {
-		var response *DeleteItemResponse
+		var response *DeleteImageResponse
 		var err error
 		defer close(result)
-		response, err = client.DeleteItem(request)
+		response, err = client.DeleteImage(request)
 		callback(response, err)
 		result <- 1
 	})
@@ -73,14 +73,16 @@ func (client *Client) DeleteItemWithCallback(request *DeleteItemRequest, callbac
 	return result
 }
 
-// DeleteItemRequest is the request struct for api DeleteItem
-type DeleteItemRequest struct {
+// DeleteImageRequest is the request struct for api DeleteImage
+type DeleteImageRequest struct {
 	*requests.RoaRequest
-	InstanceName string `position:"Query" name:"instanceName"`
+	InstanceName string `position:"Body" name:"InstanceName"`
+	ProductId    string `position:"Body" name:"ProductId"`
+	PicName      string `position:"Body" name:"PicName"`
 }
 
-// DeleteItemResponse is the response struct for api DeleteItem
-type DeleteItemResponse struct {
+// DeleteImageResponse is the response struct for api DeleteImage
+type DeleteImageResponse struct {
 	*responses.BaseResponse
 	RequestId string `json:"RequestId" xml:"RequestId"`
 	Success   bool   `json:"Success" xml:"Success"`
@@ -88,19 +90,19 @@ type DeleteItemResponse struct {
 	Code      int    `json:"Code" xml:"Code"`
 }
 
-// CreateDeleteItemRequest creates a request to invoke DeleteItem API
-func CreateDeleteItemRequest() (request *DeleteItemRequest) {
-	request = &DeleteItemRequest{
+// CreateDeleteImageRequest creates a request to invoke DeleteImage API
+func CreateDeleteImageRequest() (request *DeleteImageRequest) {
+	request = &DeleteImageRequest{
 		RoaRequest: &requests.RoaRequest{},
 	}
-	request.InitWithApiInfo("ImageSearch", "2018-01-20", "DeleteItem", "/item/delete", "imagesearch", "openAPI")
+	request.InitWithApiInfo("ImageSearch", "2019-03-25", "DeleteImage", "/v2/image/delete", "imagesearch", "openAPI")
 	request.Method = requests.POST
 	return
 }
 
-// CreateDeleteItemResponse creates a response to parse from DeleteItem response
-func CreateDeleteItemResponse() (response *DeleteItemResponse) {
-	response = &DeleteItemResponse{
+// CreateDeleteImageResponse creates a response to parse from DeleteImage response
+func CreateDeleteImageResponse() (response *DeleteImageResponse) {
+	response = &DeleteImageResponse{
 		BaseResponse: &responses.BaseResponse{},
 	}
 	return

+ 120 - 0
services/imagesearch/search_image.go

@@ -0,0 +1,120 @@
+package imagesearch
+
+//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"
+)
+
+// SearchImage invokes the imagesearch.SearchImage API synchronously
+// api document: https://help.aliyun.com/api/imagesearch/searchimage.html
+func (client *Client) SearchImage(request *SearchImageRequest) (response *SearchImageResponse, err error) {
+	response = CreateSearchImageResponse()
+	err = client.DoAction(request, response)
+	return
+}
+
+// SearchImageWithChan invokes the imagesearch.SearchImage API asynchronously
+// api document: https://help.aliyun.com/api/imagesearch/searchimage.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SearchImageWithChan(request *SearchImageRequest) (<-chan *SearchImageResponse, <-chan error) {
+	responseChan := make(chan *SearchImageResponse, 1)
+	errChan := make(chan error, 1)
+	err := client.AddAsyncTask(func() {
+		defer close(responseChan)
+		defer close(errChan)
+		response, err := client.SearchImage(request)
+		if err != nil {
+			errChan <- err
+		} else {
+			responseChan <- response
+		}
+	})
+	if err != nil {
+		errChan <- err
+		close(responseChan)
+		close(errChan)
+	}
+	return responseChan, errChan
+}
+
+// SearchImageWithCallback invokes the imagesearch.SearchImage API asynchronously
+// api document: https://help.aliyun.com/api/imagesearch/searchimage.html
+// asynchronous document: https://help.aliyun.com/document_detail/66220.html
+func (client *Client) SearchImageWithCallback(request *SearchImageRequest, callback func(response *SearchImageResponse, err error)) <-chan int {
+	result := make(chan int, 1)
+	err := client.AddAsyncTask(func() {
+		var response *SearchImageResponse
+		var err error
+		defer close(result)
+		response, err = client.SearchImage(request)
+		callback(response, err)
+		result <- 1
+	})
+	if err != nil {
+		defer close(result)
+		callback(nil, err)
+		result <- 0
+	}
+	return result
+}
+
+// SearchImageRequest is the request struct for api SearchImage
+type SearchImageRequest struct {
+	*requests.RoaRequest
+	Filter       string           `position:"Body" name:"Filter"`
+	PicContent   string           `position:"Body" name:"PicContent"`
+	InstanceName string           `position:"Body" name:"InstanceName"`
+	ProductId    string           `position:"Body" name:"ProductId"`
+	Num          requests.Integer `position:"Body" name:"Num"`
+	PicName      string           `position:"Body" name:"PicName"`
+	Start        requests.Integer `position:"Body" name:"Start"`
+	Region       string           `position:"Body" name:"Region"`
+	Type         string           `position:"Body" name:"Type"`
+	CategoryId   requests.Integer `position:"Body" name:"CategoryId"`
+	Crop         requests.Boolean `position:"Body" name:"Crop"`
+}
+
+// SearchImageResponse is the response struct for api SearchImage
+type SearchImageResponse struct {
+	*responses.BaseResponse
+	RequestId string    `json:"RequestId" xml:"RequestId"`
+	Success   bool      `json:"Success" xml:"Success"`
+	Code      int       `json:"Code" xml:"Code"`
+	Msg       string    `json:"Msg" xml:"Msg"`
+	Head      Head      `json:"Head" xml:"Head"`
+	PicInfo   PicInfo   `json:"PicInfo" xml:"PicInfo"`
+	Auctions  []Auction `json:"Auctions" xml:"Auctions"`
+}
+
+// CreateSearchImageRequest creates a request to invoke SearchImage API
+func CreateSearchImageRequest() (request *SearchImageRequest) {
+	request = &SearchImageRequest{
+		RoaRequest: &requests.RoaRequest{},
+	}
+	request.InitWithApiInfo("ImageSearch", "2019-03-25", "SearchImage", "/v2/image/search", "imagesearch", "openAPI")
+	request.Method = requests.POST
+	return
+}
+
+// CreateSearchImageResponse creates a response to parse from SearchImage response
+func CreateSearchImageResponse() (response *SearchImageResponse) {
+	response = &SearchImageResponse{
+		BaseResponse: &responses.BaseResponse{},
+	}
+	return
+}

+ 0 - 110
services/imagesearch/search_item.go

@@ -1,110 +0,0 @@
-package imagesearch
-
-//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"
-)
-
-// SearchItem invokes the imagesearch.SearchItem API synchronously
-// api document: https://help.aliyun.com/api/imagesearch/searchitem.html
-func (client *Client) SearchItem(request *SearchItemRequest) (response *SearchItemResponse, err error) {
-	response = CreateSearchItemResponse()
-	err = client.DoAction(request, response)
-	return
-}
-
-// SearchItemWithChan invokes the imagesearch.SearchItem API asynchronously
-// api document: https://help.aliyun.com/api/imagesearch/searchitem.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) SearchItemWithChan(request *SearchItemRequest) (<-chan *SearchItemResponse, <-chan error) {
-	responseChan := make(chan *SearchItemResponse, 1)
-	errChan := make(chan error, 1)
-	err := client.AddAsyncTask(func() {
-		defer close(responseChan)
-		defer close(errChan)
-		response, err := client.SearchItem(request)
-		if err != nil {
-			errChan <- err
-		} else {
-			responseChan <- response
-		}
-	})
-	if err != nil {
-		errChan <- err
-		close(responseChan)
-		close(errChan)
-	}
-	return responseChan, errChan
-}
-
-// SearchItemWithCallback invokes the imagesearch.SearchItem API asynchronously
-// api document: https://help.aliyun.com/api/imagesearch/searchitem.html
-// asynchronous document: https://help.aliyun.com/document_detail/66220.html
-func (client *Client) SearchItemWithCallback(request *SearchItemRequest, callback func(response *SearchItemResponse, err error)) <-chan int {
-	result := make(chan int, 1)
-	err := client.AddAsyncTask(func() {
-		var response *SearchItemResponse
-		var err error
-		defer close(result)
-		response, err = client.SearchItem(request)
-		callback(response, err)
-		result <- 1
-	})
-	if err != nil {
-		defer close(result)
-		callback(nil, err)
-		result <- 0
-	}
-	return result
-}
-
-// SearchItemRequest is the request struct for api SearchItem
-type SearchItemRequest struct {
-	*requests.RoaRequest
-	InstanceName string `position:"Query" name:"instanceName"`
-}
-
-// SearchItemResponse is the response struct for api SearchItem
-type SearchItemResponse struct {
-	*responses.BaseResponse
-	RequestId string   `json:"RequestId" xml:"RequestId"`
-	Success   bool     `json:"Success" xml:"Success"`
-	Message   string   `json:"Message" xml:"Message"`
-	Code      int      `json:"Code" xml:"Code"`
-	Head      Head     `json:"Head" xml:"Head"`
-	PicInfo   PicInfo  `json:"PicInfo" xml:"PicInfo"`
-	Auctions  Auctions `json:"Auctions" xml:"Auctions"`
-}
-
-// CreateSearchItemRequest creates a request to invoke SearchItem API
-func CreateSearchItemRequest() (request *SearchItemRequest) {
-	request = &SearchItemRequest{
-		RoaRequest: &requests.RoaRequest{},
-	}
-	request.InitWithApiInfo("ImageSearch", "2018-01-20", "SearchItem", "/item/search", "imagesearch", "openAPI")
-	request.Method = requests.POST
-	return
-}
-
-// CreateSearchItemResponse creates a response to parse from SearchItem response
-func CreateSearchItemResponse() (response *SearchItemResponse) {
-	response = &SearchItemResponse{
-		BaseResponse: &responses.BaseResponse{},
-	}
-	return
-}

+ 2 - 2
services/imagesearch/struct_all_category.go → services/imagesearch/struct_all_categories.go

@@ -15,7 +15,7 @@ package imagesearch
 // Code generated by Alibaba Cloud SDK Code Generator.
 // Changes may cause incorrect behavior and will be lost if the code is regenerated.
 
-// AllCategory is a nested struct in imagesearch response
-type AllCategory struct {
+// AllCategories is a nested struct in imagesearch response
+type AllCategories struct {
 	Category []Category `json:"Category" xml:"Category"`
 }

+ 6 - 4
services/imagesearch/struct_auction.go

@@ -17,9 +17,11 @@ package imagesearch
 
 // Auction is a nested struct in imagesearch response
 type Auction struct {
-	CustContent    string `json:"CustContent" xml:"CustContent"`
-	ItemId         string `json:"ItemId" xml:"ItemId"`
-	SortExprValues string `json:"SortExprValues" xml:"SortExprValues"`
-	CatId          string `json:"CatId" xml:"CatId"`
+	CategoryId     int    `json:"CategoryId" xml:"CategoryId"`
+	ProductId      string `json:"ProductId" xml:"ProductId"`
 	PicName        string `json:"PicName" xml:"PicName"`
+	CustomContent  string `json:"CustomContent" xml:"CustomContent"`
+	SortExprValues string `json:"SortExprValues" xml:"SortExprValues"`
+	IntAttr        int    `json:"IntAttr" xml:"IntAttr"`
+	StrAttr        string `json:"StrAttr" xml:"StrAttr"`
 }

+ 1 - 1
services/imagesearch/struct_category.go

@@ -17,6 +17,6 @@ package imagesearch
 
 // Category is a nested struct in imagesearch response
 type Category struct {
+	Id   int    `json:"Id" xml:"Id"`
 	Name string `json:"Name" xml:"Name"`
-	Id   string `json:"Id" xml:"Id"`
 }

+ 2 - 2
services/imagesearch/struct_head.go

@@ -17,7 +17,7 @@ package imagesearch
 
 // Head is a nested struct in imagesearch response
 type Head struct {
-	SearchTime int `json:"SearchTime" xml:"SearchTime"`
-	DocsFound  int `json:"DocsFound" xml:"DocsFound"`
 	DocsReturn int `json:"DocsReturn" xml:"DocsReturn"`
+	DocsFound  int `json:"DocsFound" xml:"DocsFound"`
+	SearchTime int `json:"SearchTime" xml:"SearchTime"`
 }

+ 3 - 3
services/imagesearch/struct_pic_info.go

@@ -17,7 +17,7 @@ package imagesearch
 
 // PicInfo is a nested struct in imagesearch response
 type PicInfo struct {
-	Category    string      `json:"Category" xml:"Category"`
-	Region      string      `json:"Region" xml:"Region"`
-	AllCategory AllCategory `json:"AllCategory" xml:"AllCategory"`
+	Region        string     `json:"Region" xml:"Region"`
+	CategoryId    int        `json:"CategoryId" xml:"CategoryId"`
+	AllCategories []Category `json:"AllCategories" xml:"AllCategories"`
 }