https://github.com/dietdoctor/go-trustpilot
Trustpilot API client library for Go
https://github.com/dietdoctor/go-trustpilot
api client golang library trustpilot
Last synced: 5 months ago
JSON representation
Trustpilot API client library for Go
- Host: GitHub
- URL: https://github.com/dietdoctor/go-trustpilot
- Owner: dietdoctor
- License: mit
- Created: 2020-06-09T10:32:09.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-22T11:12:45.000Z (over 3 years ago)
- Last Synced: 2024-06-20T13:35:53.110Z (about 2 years ago)
- Topics: api, client, golang, library, trustpilot
- Language: Go
- Homepage:
- Size: 43 KB
- Stars: 5
- Watchers: 13
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-trustpilot
Trustpilot API client library for Go.
 [](https://godoc.org/github.com/dietdoctor/go-trustpilot)
This library does not implement full Trustpilot API.
## Getting Started
The client library can be configured using `ClientOption` as functional options.
```go
func ExampleNewClient() {
authConfig := &trustpilot.PasswordGrantConfig{
ClientID: "1a9SsZ2XJKraw1Prl8m+gvq",
ClientSecret: "AxLoJhlAcbWiVA8cHW2fINep",
Username: "apiuser@example.com",
Password: "6X2hQa1lPHu9dVjikUr0FbRt",
}
client, err := trustpilot.NewClient(
trustpilot.AuthConfig(authConfig),
trustpilot.Debug(true),
)
if err != nil {
// TODO handle the error.
}
_ = client
}
```
## Authentication
This client supports Trustpilot's oauth 2.0 `password` grant type. Other
Trustpilot-supported grant types may be added.