Giter VIP home page Giter VIP logo

go-w3w's Introduction

go-w3w

Unofficial client for interacting with What3Words API.

How to use

Go 1.13+ required. To start off get the package using go get or add it to your go.mod.

go get github.com/cpl/go-w3w

Then simply create a client and use the methods.

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.
  • 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

go-w3w's People

Contributors

cpl avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

eljoth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.