Skip to content
Golang client for iptrace web-service API to determine location of visitors based on their IP.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
fixtures
.gitignore
.travis.yml
client.go
http_client.go
http_client_test.go
http_error.go
ipinfo.go
ipinfo_api.go
ipinfo_api_test.go
readme.md

readme.md

iptrace.io Golang client

Golang client for iptrace web-service API to determine location of visitors based on their IP.

Installation

go get -u github.com/getiptrace/iptrace-go

usage

Get ip info:

package main

import (
	iptrace "github.com/getiptrace/iptrace-go"
	"fmt"
)

func main() {

	iptraceClient, err := iptrace.NewClient("API Key HERE")
	if err != nil {
		fmt.Println(err)
		return
	}

	response, err := iptraceClient.IPRepo.GetAllDataByIP("IP HERE")
	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(response)
}


Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

You can’t perform that action at this time.