Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sergey-chechaev/elixir_ipgeobase
Find Russian and Ukraine city by IP address and find country for other country Elixir
https://github.com/sergey-chechaev/elixir_ipgeobase
Last synced: 2 months ago
JSON representation
Find Russian and Ukraine city by IP address and find country for other country Elixir
- Host: GitHub
- URL: https://github.com/sergey-chechaev/elixir_ipgeobase
- Owner: sergey-chechaev
- License: mit
- Created: 2016-05-06T13:34:54.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-03-03T21:38:42.000Z (almost 5 years ago)
- Last Synced: 2024-10-07T08:07:58.787Z (3 months ago)
- Language: Elixir
- Homepage:
- Size: 10.7 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Find Russian and Ukraine city by IP address and find country for other country. (Geolocation)
- fucking-awesome-elixir - ipgeobase - Find Russian and Ukraine city by IP address and find country for other country. (Geolocation)
- awesome-elixir - ipgeobase - Find Russian and Ukraine city by IP address and find country for other country. (Geolocation)
README
# Ipgeobase
**Find Russian and Ukraine city by IP address and find country for other country. Source http://ipgeobase.ru/**
## Examples
iex> ip = Ipgeobase.find_by_ip("46.188.121.160")
%Ipgeobase{city: "Москва", country: "RU"}
iex> ip.city
"Москва"
iex> ip.country
"RU"
iex> Ipgeobase.find_by_ip("5.10.159.255")
%Ipgeobase{city: "", country: "GB"}
iex> ip.country
"GB"## Installation
It [available in Hex](https://hex.pm/packages/ipgeobase/0.0.1), the package can be installed as:
1. Add ipgeobase to your list of dependencies in `mix.exs`:
def deps do
[{:ipgeobase, "~> 0.0.1"}]
end2. Ensure ipgeobase is started before your application:
def application do
[applications: [:ipgeobase]]
end