An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

        

# Brandfetch

[![GoDoc](https://godoc.org/github.com/rvflash/brandfetch/v2?status.svg)](https://godoc.org/github.com/rvflash/brandfetch/v2)
[![Build Status](https://github.com/rvflash/brandfetch/workflows/build/badge.svg)](https://github.com/rvflash/brandfetch/actions?workflow=build)
[![Code Coverage](https://codecov.io/gh/rvflash/brandfetch/branch/main/graph/badge.svg)](https://codecov.io/gh/rvflash/brandfetch)
[![Go Report Card](https://goreportcard.com/badge/github.com/rvflash/brandfetch/v2?)](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.