Trustpilot API client library for Go.
This library does not implement full Trustpilot API.
The client library can be configured using ClientOption
as functional options.
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
}
This client supports Trustpilot's oauth 2.0 password
grant type. Other
Trustpilot-supported grant types may be added.