https://github.com/mattbit/amazonpa
Go lang library for Amazon Product Advertising API
https://github.com/mattbit/amazonpa
Last synced: about 1 year ago
JSON representation
Go lang library for Amazon Product Advertising API
- Host: GitHub
- URL: https://github.com/mattbit/amazonpa
- Owner: mattbit
- License: mit
- Created: 2016-01-08T18:12:04.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-12-30T11:06:42.000Z (over 8 years ago)
- Last Synced: 2025-04-09T09:40:56.232Z (about 1 year ago)
- Language: Go
- Size: 26.4 KB
- Stars: 9
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/mattbit/amazonpa)
# Amazon PA
A Go lang library to interact with Amazon Product Advertising API.
The library does not cover all the functionality of the PA API, but feel free to create new pull requests and I will try to merge them quickly!
## Example
```go
package main
import (
"fmt"
"github.com/mattbit/amazonpa"
)
func main() {
cfg := amazonpa.Config{
AccessKey: "YOUR_KEY",
AccessSecret: "YOUR_SECRET",
AssociateTag: "YOUR_TAG",
Region: "YOUR_REGION",
Secure: true,
}
client := amazonpa.NewClient(cfg)
query := amazonpa.ItemSearchQuery{
SearchIndex: "All",
Keywords: "mouse",
ResponseGroups: []string{"Large"},
}
response, err := client.ItemSearch(query)
if err != nil {
fmt.Println(err)
} else {
fmt.Printf("Found %d items\n", len(response.Items.Items))
}
}
```