Coder Social home page Coder Social logo

geolocator's Introduction

Description of geolocator

It's REST API which locates and stores location basing on IP or URL.

Code style

Rubocop

Built with:

Installing

$ git clone https://github.com/KacperMekarski/geolocator.git

$ cd geolocator

Download master.key file and place it in config directory. File was given in email with link to this repo)

$ docker compose build

$ docker compose run web rake db:setup

$ docker compose up

You can run tests with:
$ docker compose run web bundle exec rspec spec

Stop application with:
$ docker compose down

API Documentation

Sorry for such documentation, I know it should be done with swagger or something but I didn't have time for it.

IP

Provide geolocation data based on IP address:
GET /api/ip_addresses/20.199.210.196

Delete geolocation data based on IP address:
DELETE /api/ip_addresses/20.199.210.196

Add geolocation data based on IP address:
POST /api/ip_addresses, body: { 'ip': '20.199.210.196' }

URL

Please note URL should be encoded.

Provide geolocation data based on URL address:
GET /api/domains?url=https://google.com

Delete geolocation data based on URL address:
DELETE /api/domains?url=https://google.com

Add geolocation data based on URL address:
POST /api/domains, body: { 'url': 'https://google.com' }

Author

License

MIT © Kacper Mękarski

geolocator's People

Contributors

kacpermekarski avatar

Watchers

 avatar

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.