Documentation ¶
Overview ¶
Package amazonproduct provides methods for interacting with the Amazon Product Advertising API
Index ¶
- func GenerateAmazonUrl(api AmazonProductAPI, Operation string, Parameters map[string]string) (finalUrl *url.URL, err error)
- func SetTimestamp(origUrl *url.URL) (err error)
- func SignAmazonUrl(origUrl *url.URL, api AmazonProductAPI) (signedUrl string, err error)
- type AmazonProductAPI
- func (api AmazonProductAPI) BrowseNodeLookup(nodeId string) (string, error)
- func (api AmazonProductAPI) BrowseNodeLookupWithResponseGroup(nodeId string, responseGroup string) (string, error)
- func (api AmazonProductAPI) CartAdd(items map[string]int, cartid, HMAC string) (string, error)
- func (api AmazonProductAPI) CartClear(CartId, HMAC string) (string, error)
- func (api AmazonProductAPI) CartCreate(items map[string]int) (string, error)
- func (api AmazonProductAPI) CartGet(CartId, HMAC string) (string, error)
- func (api AmazonProductAPI) ItemLookup(ItemId string) (string, error)
- func (api AmazonProductAPI) ItemLookupWithParams(params map[string]string) (string, error)
- func (api AmazonProductAPI) ItemLookupWithResponseGroup(ItemId string, ResponseGroup string) (string, error)
- func (api AmazonProductAPI) ItemSearch(SearchIndex string, Parameters map[string]string) (string, error)
- func (api AmazonProductAPI) ItemSearchByKeyword(Keywords string, page int) (string, error)
- func (api AmazonProductAPI) ItemSearchByKeywordWithResponseGroup(Keywords string, ResponseGroup string, page int) (string, error)
- func (api AmazonProductAPI) ItemSearchByKeywordWithResponseGroupWithSearchIndex(Keywords string, ResponseGroup string, SearchIndex string, page int) (string, error)
- func (api AmazonProductAPI) MultipleItemLookup(ItemIds []string) (string, error)
- func (api AmazonProductAPI) MultipleItemLookupWithResponseGroup(ItemIds []string, ResponseGroup string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAmazonUrl ¶
func SetTimestamp ¶
func SignAmazonUrl ¶
func SignAmazonUrl(origUrl *url.URL, api AmazonProductAPI) (signedUrl string, err error)
Types ¶
type AmazonProductAPI ¶
type AmazonProductAPI struct { AccessKey string SecretKey string AssociateTag string Host string Client *http.Client }
func (AmazonProductAPI) BrowseNodeLookup ¶
func (api AmazonProductAPI) BrowseNodeLookup(nodeId string) (string, error)
BrowseNodeLookup takes a BrowseNodeId and returns the result.
func (AmazonProductAPI) BrowseNodeLookupWithResponseGroup ¶
func (api AmazonProductAPI) BrowseNodeLookupWithResponseGroup(nodeId string, responseGroup string) (string, error)
func (AmazonProductAPI) CartAdd ¶
CartAdd takes a map containing ASINs and quantities and adds them to the given cart. Up to 10 items are allowed
func (AmazonProductAPI) CartClear ¶
func (api AmazonProductAPI) CartClear(CartId, HMAC string) (string, error)
CartClear takes a CartId and HMAC that were returned when generating a cart It then removes the contents of the cart
func (AmazonProductAPI) CartCreate ¶
func (api AmazonProductAPI) CartCreate(items map[string]int) (string, error)
CartCreate takes a map containing ASINs and quantities. Up to 10 items are allowed
func (AmazonProductAPI) CartGet ¶
func (api AmazonProductAPI) CartGet(CartId, HMAC string) (string, error)
Cart get takes a CartID and HMAC that were returned when generating a cart Returns the contents of the specified cart
func (AmazonProductAPI) ItemLookup ¶
func (api AmazonProductAPI) ItemLookup(ItemId string) (string, error)
ItemLookup takes a product ID (ASIN) and returns the result
func (AmazonProductAPI) ItemLookupWithParams ¶
func (api AmazonProductAPI) ItemLookupWithParams(params map[string]string) (string, error)
ItemLookupWithParams takes the params for ItemLookup and returns the result
func (AmazonProductAPI) ItemLookupWithResponseGroup ¶
func (api AmazonProductAPI) ItemLookupWithResponseGroup(ItemId string, ResponseGroup string) (string, error)
ItemLookupWithResponseGroup takes a product ID (ASIN) and a ResponseGroup and returns the result
func (AmazonProductAPI) ItemSearch ¶
func (AmazonProductAPI) ItemSearchByKeyword ¶
func (api AmazonProductAPI) ItemSearchByKeyword(Keywords string, page int) (string, error)
ItemSearchByKeyword takes a string containing keywords and returns the search results
func (AmazonProductAPI) ItemSearchByKeywordWithResponseGroup ¶
func (api AmazonProductAPI) ItemSearchByKeywordWithResponseGroup(Keywords string, ResponseGroup string, page int) (string, error)
Modifed
func (AmazonProductAPI) ItemSearchByKeywordWithResponseGroupWithSearchIndex ¶
func (api AmazonProductAPI) ItemSearchByKeywordWithResponseGroupWithSearchIndex(Keywords string, ResponseGroup string, SearchIndex string, page int) (string, error)
Added new
func (AmazonProductAPI) MultipleItemLookup ¶
func (api AmazonProductAPI) MultipleItemLookup(ItemIds []string) (string, error)
MultipleItemLookup takes an array of product IDs (ASIN) and returns the result
func (AmazonProductAPI) MultipleItemLookupWithResponseGroup ¶
func (api AmazonProductAPI) MultipleItemLookupWithResponseGroup(ItemIds []string, ResponseGroup string) (string, error)
MultipleItemLookupWithResponseGroup takes an array of product IDs (ASIN) as well as a ResponseGroup and returns the result