https://github.com/z3ntl3/trustpilot
A Trustpilot client for Go programs. Useful to retrieve data from Trustpilot, such as the reviews statistic and star rating SVG.
https://github.com/z3ntl3/trustpilot
go library module package trustpilot
Last synced: about 2 months ago
JSON representation
A Trustpilot client for Go programs. Useful to retrieve data from Trustpilot, such as the reviews statistic and star rating SVG.
- Host: GitHub
- URL: https://github.com/z3ntl3/trustpilot
- Owner: Z3NTL3
- License: gpl-3.0
- Created: 2024-07-24T13:01:36.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-07-24T13:02:26.000Z (10 months ago)
- Last Synced: 2025-02-09T04:16:00.536Z (4 months ago)
- Topics: go, library, module, package, trustpilot
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Trustpilot Client
A Trustpilot client for Go programs. Useful to retrieve data from Trustpilot, such as the reviews statistic and star rating SVG.### Installation
> go get github.com/z3ntl3/trustpilot/client#### Posibilities
- Option to thoroughly customize the underlying HTTP client this package uses.> Useful to proxy or to set a custom dial timeout or anything alike etc.
#### Model
The model you can easily acquire from Trustpilot, using this client package:```
{
Company: "IKEA"
Reviews: {
Total: "1.5"
Text: "24,080 • Bad"
}
ImageSRC: "https://cdn.trustpilot.net/brand-assets/4.1.0/stars/stars-1.5.svg"
}
```#### API example
```go
package mainimport (
"fmt"
"log""github.com/z3ntl3/trustpilot/client"
)var URL = "https://trustpilot.com/review/www.ikea.com"
func main() {
client := client.New()result, err := client.Execute(URL)
if err != nil {
log.Fatal(err)
}fmt.Printf("Resulting date model: %+v \n", result)
}
```