Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ngs/go-amazon-product-advertising-api
Go Client Library for Amazon Product Advertising API
https://github.com/ngs/go-amazon-product-advertising-api
amazon amazon-product-advertising api-client go golang
Last synced: about 2 months ago
JSON representation
Go Client Library for Amazon Product Advertising API
- Host: GitHub
- URL: https://github.com/ngs/go-amazon-product-advertising-api
- Owner: ngs
- License: bsd-3-clause
- Created: 2016-11-15T15:37:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-05T22:06:29.000Z (over 6 years ago)
- Last Synced: 2024-10-25T05:25:15.003Z (about 2 months ago)
- Topics: amazon, amazon-product-advertising, api-client, go, golang
- Language: Go
- Homepage: https://godoc.org/github.com/ngs/go-amazon-product-advertising-api/amazon
- Size: 217 KB
- Stars: 57
- Watchers: 1
- Forks: 14
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - amazon-product-advertising-api - Go Client Library for [Amazon Product Advertising API](https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html). (Third-party APIs / Utility/Miscellaneous)
- awesome-go - go-amazon-product-advertising-api - Go Client Library for Amazon Product Advertising API - ★ 32 (Third-party APIs)
- awesome-go-extra - go-amazon-product-advertising-api - 11-15T15:37:32Z|2018-04-05T22:06:29Z| (Third-party APIs / Fail injection)
README
go-amazon-product-advertising-api
=================================[![Build Status](https://travis-ci.org/ngs/go-amazon-product-advertising-api.svg?branch=master)](https://travis-ci.org/ngs/go-amazon-product-advertising-api)
[![GoDoc](https://godoc.org/github.com/ngs/go-amazon-product-advertising-api/amazon?status.svg)](https://godoc.org/github.com/ngs/go-amazon-product-advertising-api/amazon)
[![Go Report Card](https://goreportcard.com/badge/github.com/ngs/go-amazon-product-advertising-api)](https://goreportcard.com/report/github.com/ngs/go-amazon-product-advertising-api)
[![Coverage Status](https://coveralls.io/repos/github/ngs/go-amazon-product-advertising-api/badge.svg?branch=master)](https://coveralls.io/github/ngs/go-amazon-product-advertising-api?branch=master)Go Client Library for [Amazon Product Advertising API]
How to Use
----------```sh
go get -u github.com/ngs/go-amazon-product-advertising-api/amazon
``````go
package mainimport (
"fmt"
"log""github.com/ngs/go-amazon-product-advertising-api/amazon"
)func main() {
client, err := amazon.NewFromEnvionment()
if err != nil {
log.Fatal(err)
}
res, err := client.ItemSearch(amazon.ItemSearchParameters{
SearchIndex: amazon.SearchIndexBooks,
Keywords: "Go 言語",
}).Do()
if err != nil {
log.Fatal(err)
}
fmt.Printf("%d results found\n\n", res.Items.TotalResults)
for _, item := range res.Items.Item {
fmt.Printf(`-------------------------------
[Title] %v
[URL] %v
`, item.ItemAttributes.Title, item.DetailPageURL)
}
}
``````sh
export AWS_ACCESS_KEY_ID=${YOUR_AWS_ACCESS_KEY_ID}
export AWS_SECRET_ACCESS_KEY=${YOUR_AWS_SECRET_ACCESS_KEY}
export AWS_PRODUCT_REGION=JP
export AWS_ASSOCIATE_TAG=ngsio-22go run item_search.go
```[Amazon Product Advertising API]: https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html
## Author
[Atsushi Nagase]
## License
See [LICENSE]
[Atsushi Nagase]: https://ngs.io
[LICENSE]: LICENSE