https://github.com/rvflash/brandfetch
Unofficial Golang interface for the Brandfetch API.
https://github.com/rvflash/brandfetch
Last synced: 2 months ago
JSON representation
Unofficial Golang interface for the Brandfetch API.
- Host: GitHub
- URL: https://github.com/rvflash/brandfetch
- Owner: rvflash
- License: mit
- Created: 2022-10-07T14:23:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-28T13:10:01.000Z (over 2 years ago)
- Last Synced: 2025-01-28T16:16:29.032Z (4 months ago)
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Brandfetch
[](https://godoc.org/github.com/rvflash/brandfetch/v2)
[](https://github.com/rvflash/brandfetch/actions?workflow=build)
[](https://codecov.io/gh/rvflash/brandfetch)
[](https://goreportcard.com/report/github.com/rvflash/brandfetch/v2)Unofficial Golang interface for the [Brandfetch](https://brandfetch.com/) API.
This package starts with the v2 tag to follow the API, see the module name.
Only the Search method is implemented, please feel free to help if you want the Brand entry point or others.
### Installation
```bash
$ go get -u github.com/rvflash/brandfetch/v2
```Requirement: this package uses the `url.JoinPath` function incoming with Golang 1.19.
### Usage
```go
import "github.com/rvflash/brandfetch/v2"
// ...
res, err := brandfetch.BrandByName(context.Background(), "example")
if err != nil {
log.Panicln(err)
}
fmt.Println(res.Domain)
// Output: example.com
```See API tests for more examples.