https://github.com/cpl/go-w3w
Unofficial Golang what3words client
https://github.com/cpl/go-w3w
api-client golang w3w what3words what3words-api
Last synced: 5 months ago
JSON representation
Unofficial Golang what3words client
- Host: GitHub
- URL: https://github.com/cpl/go-w3w
- Owner: cpl
- License: mit
- Created: 2020-08-02T18:00:51.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-01T17:06:24.000Z (over 4 years ago)
- Last Synced: 2024-06-20T00:28:47.008Z (almost 2 years ago)
- Topics: api-client, golang, w3w, what3words, what3words-api
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-w3w
Unofficial client for interacting with [What3Words](https://what3words.com/) [API](https://developer.what3words.com).
## How to use
Go 1.13+ required. To start off get the package using `go get` or add it to your `go.mod`.
```bash
go get github.com/cpl/go-w3w
```
Then simply create a client and use the methods.
```go
package main
import (
"fmt"
"log"
"github.com/cpl/go-w3w/pkg/client"
)
var address = "filled.count.soap"
func main() {
c := client.New("your-key")
response, err := c.ConvertToCoordinates(address)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Coordinates.Lat)
fmt.Println(response.Coordinates.Lng)
fmt.Println(response.Map)
fmt.Println(response.NearestPlace)
}
```
## Notes
* This client was developed for personal use, but feel free to include it in your projects. Semver releases are respected, meaning `v0.1.Z` will be for development period, but no breaking changes will occur until `v1.Y.Z`.
* There are no plans to include the full features of the official W3W API.
* There are official clients for other languages/frameworks on the official dev [page](https://developer.what3words.com/public-api).
* This is a passion project, as I really like the concept and see the potential as this gets adopted more and more.
* I also find the 3word addresses extremely funny and entertaining.
* I will do a `cli` if I see any use for it