{"id":26262052,"url":"https://github.com/aaomidi/go-ipinfo","last_synced_at":"2025-04-30T09:21:48.603Z","repository":{"id":147465841,"uuid":"136696542","full_name":"aaomidi/go-ipinfo","owner":"aaomidi","description":"Unofficial ipinfo.io GoLang API Wrapper","archived":false,"fork":false,"pushed_at":"2021-09-23T20:55:54.000Z","size":37,"stargazers_count":9,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-26T13:12:28.867Z","etag":null,"topics":["go","golang","ipinfo"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aaomidi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-09T06:20:45.000Z","updated_at":"2024-09-01T17:21:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"f1f01faa-155c-452c-9564-bb2d6a3dc627","html_url":"https://github.com/aaomidi/go-ipinfo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaomidi%2Fgo-ipinfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaomidi%2Fgo-ipinfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaomidi%2Fgo-ipinfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaomidi%2Fgo-ipinfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaomidi","download_url":"https://codeload.github.com/aaomidi/go-ipinfo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251674990,"owners_count":21625717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","ipinfo"],"created_at":"2025-03-14T00:17:16.687Z","updated_at":"2025-04-30T09:21:48.580Z","avatar_url":"https://github.com/aaomidi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GO IPInfo\n[![License](http://img.shields.io/:license-mit-blue.svg)](LICENSE)\n[![Travis](https://travis-ci.com/aaomidi/go-ipinfo.svg?branch=master\u0026style=flat-square)](https://travis-ci.com/aaomidi/go-ipinfo)\n[![Go Report Card](https://goreportcard.com/badge/github.com/aaomidi/go-ipinfo)](https://goreportcard.com/report/github.com/aaomidi/go-ipinfo)\n[![GoDoc](https://godoc.org/github.com/aaomidi/go-ipinfo?status.svg)](https://godoc.org/github.com/aaomidi/go-ipinfo)\n\n\nAn unofficial GoLang wrapper around IPInfo.\n\n## Features:\n- IP Lookup\n- ASN Lookup\n\n## Installing it\n\n````bash\ngo get github.com/aaomidi/go-ipinfo/...\n````\n\n## Using it\n\n### Examples\n\nTo get information about an IP:\n\n````go\nfunc main() {\n\n    api := IPInfo{Token: \"YOUR_TOKEN\"}\n\n    ip := net.ParseIP(\"8.8.8.8\")\n\n    response, err := api.LookupIP(ip) // Type IPResponse\n}\n````\n\nTo get the information about an ASN:\n\n````\nfunc main() {\n    api := IPInfo{Token: \"YOUR_TOKEN\"}\n\n    response, err := api.LookupASN(\"AS7922\")\n}\n````\n\n### Errors\n\nWe've provided several errors to help you check for common issues:\n\n- RateLimitedError - This error is telling you that you've been limited by the wrapper.\n- ErrorResponseError - This error is telling you that the response from one of the API endpoints was an error.\n- NoSuchCountryError - This error is telling you that the ISO2 country code couldn't be translated to a country name.\n\n### IPInfo Structure\n\nThe struct `IPInfo` is the entry point to this library. None of the values in the struct are required, and will be set to defaults if you do not set them.\n\nConsult the table to see what the default value of these variables are:\n\n| Variable       | Purpose                                                                            | Default Value                                       |\n|----------------|------------------------------------------------------------------------------------|-----------------------------------------------------|\n| Token          | Token used to communicate with the API                                             | Empty string \"\"                                     |\n| Client         | A pointer to the http.Client.                                                      | The default http.Client with a timeout of 5 seconds |\n| LanguageReader | A pointer to io.Reader. This reader will be used to decode the json language file. | A reader to static/en_US.json                       |\n\n### The other structs\n\n[Code](https://github.com/aaomidi/go-ipinfo/blob/master/ipinfo/ipinfo_structures.go) is the best documentation for this.\n\n### The language system\n\nWe've included an [example](https://github.com/aaomidi/go-ipinfo/blob/master/static/en_US.json) English, United States language file. You can include your own and provide the reader to us using:\n`os.Open(\"path/to/file\")`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaomidi%2Fgo-ipinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaomidi%2Fgo-ipinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaomidi%2Fgo-ipinfo/lists"}