All Projects → ipdata → go

ipdata / go

Licence: MIT license
Official Golang client library for the ipdata API

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to go

ipinfodb-php
PHP library to query free IPInfoDB API service.
Stars: ✭ 15 (-28.57%)
Mutual labels:  geolocation, geolocation-api
php
Official PHP client library for the ipdata API
Stars: ✭ 16 (-23.81%)
Mutual labels:  geolocation, ipdata
geolocation
A laravel integration for using the IPInfoDB and Ip2Location services
Stars: ✭ 38 (+80.95%)
Mutual labels:  geolocation, geolocation-api
react-hook-geolocation
A React hook to access data from the Geolocation API
Stars: ✭ 31 (+47.62%)
Mutual labels:  geolocation, geolocation-api
ipapi-python
Python bindings for https://ipapi.co (IP Address Location) - Use with python / django / flask for IP address location lookup
Stars: ✭ 42 (+100%)
Mutual labels:  geolocation, geolocation-api
ionic2-firebase-hackathon-starter
A hackathon starter for ionic2 using firebase, already has user authentication, reset password, google login etc
Stars: ✭ 34 (+61.9%)
Mutual labels:  geolocation, geolocation-api
Weather
Taiwan's Weather Maps! 想查詢每個地方的天氣嗎!?藉由 Google Maps API 的地圖服務,以及中央氣象局網站的天氣預報,讓你快速輕鬆的查詢台灣 368 個鄉鎮的天氣概況!
Stars: ✭ 206 (+880.95%)
Mutual labels:  geolocation
Clavin
CLAVIN (Cartographic Location And Vicinity INdexer) is an open source software package for document geoparsing and georesolution that employs context-based geographic entity resolution.
Stars: ✭ 237 (+1028.57%)
Mutual labels:  geolocation
React Geolocated
React Higher-Order Component for using Geolocation API
Stars: ✭ 185 (+780.95%)
Mutual labels:  geolocation
Shiny geoip
IP to location API service
Stars: ✭ 172 (+719.05%)
Mutual labels:  geolocation
google-maps-places-geolocation-for-your-ionic-app
Ionic example app of how to add Google maps, places, geolocation and related features into an Ionic Framework app.
Stars: ✭ 13 (-38.1%)
Mutual labels:  geolocation
I See You
ISeeYou is a Bash and Javascript tool to find the exact location of the users during social engineering or phishing engagements. Using exact location coordinates an attacker can perform preliminary reconnaissance which will help them in performing further targeted attacks.
Stars: ✭ 246 (+1071.43%)
Mutual labels:  geolocation
Proximityhash
Geohashes in proximity
Stars: ✭ 231 (+1000%)
Mutual labels:  geolocation
Ios
OwnTracks' iPhone App
Stars: ✭ 222 (+957.14%)
Mutual labels:  geolocation
React Geolocation
🌎🛰 Declarative geolocation for React
Stars: ✭ 238 (+1033.33%)
Mutual labels:  geolocation
Geolocation
Flutter geolocation plugin for Android and iOS.
Stars: ✭ 205 (+876.19%)
Mutual labels:  geolocation
Cities.json
Cities of the world in Json, based on GeoNames Gazetteer
Stars: ✭ 251 (+1095.24%)
Mutual labels:  geolocation
React Native Android Location Services Dialog Box
React Native Android Location Services Dialog Box
Stars: ✭ 175 (+733.33%)
Mutual labels:  geolocation
Use Position
🌍 React hook usePosition() for fetching and following a browser geolocation
Stars: ✭ 230 (+995.24%)
Mutual labels:  geolocation
Asn
ASN / RPKI validity / BGP stats / IPv4v6 / Prefix / URL / ASPath / Organization / IP reputation and geolocation lookup tool / Traceroute server
Stars: ✭ 242 (+1052.38%)
Mutual labels:  geolocation

ipdata

License GoDoc Latest Git Tag Travis master Build Status Go Cover Test Coverage Go Report Card

Package ipdata is a client for the https://ipdata.co API. It provides functions for looking up data, as well as parsing the data in a programmatic way. The simplest usage is to build a new client and then use the Lookup method.

License

This code is released under the MIT License. Please see the LICENSE for the full content of the license.

Contributing

If you'd like to contribute to this project, I welcome any pull requests against this repo. The only ask is that a GitHub issue be opened detailing the desired functionality before making any pull requests.

Usage

The service provided by ipdata requires an API key before making API calls. Attempts to create a client without one will fail, as would attempts to contact the API. You can get an API key from https://ipdata.co/.

Here is a simple example of using the library:

import (
    "github.com/ipdata/go"
    "fmt"
)

ipd, _ := ipdata.NewClient("EXAMPLE_API_KEY")

data, err := ipd.Lookup("8.8.8.8")
if err != nil {
	// handle error
}

fmt.Printf("%s (%s)\n", data.IP, data.ASN)

Errors returned from the lookup function calls may be of type Error, which includes the message from the API and the HTTP status code. The Error() method on this type only returns the message and not the status code. To maintain compatibility with Go 1.12.x, this is still using github.com/pkg/errors for error management:

import "github.com/pkg/errors"

data, err := ipd.Lookup("8.8.8.8")
if err != nil {
	// do a type assertion on the error
	rerr, ok := errors.Cause(err).(ipdata.Error)

    if !ok {
    	// this wasn't a failure from rate limiting
    }
    
    fmt.Println("%d: %s", rerr.Code(), rerr.Error())
}

Contributors

  • Tim Heckman - Created the first version of this library
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].