Giter Club home page Giter Club logo

treasure_hunt's Introduction

Programming Assignment:

Web endpoint for a treasure hunt game. It allows participants to send requests to an endpoint, containing their current position (latitude and longitude in decimal representation) and email. Response contains a distance to the treasure expressed in meters. When players are in a 5 meter radius from the treasure an e-mail message with congratulations and exact position of the treasure is sent on the provided e-mail address. Congratulations email is sent only once.

Treasure location:

50.051227 N, 19.945704 E

Request format:

/treasure_hunt.json?current_location[]=:latitude&current_location[]=:longitude&email=:email

Example request:

POST /treasure_hunt.json?current_location[]=0&current_location[]=0&[email protected]

Example response:

Successful response:

{ status: 'ok', distance: 10 }

Error response:

{ status: 'error', distance: -1, error: 'error description' }

Email Content:

“Hey, you’ve found a treasure, congratulations! You are [:nth] treasure hunter who has found the treasure.”
NOTE: [:nth] is an actual number of treasure hunters who successfully found a treasure before + 1.

Contains:

treasure_hunt's People

Contributors

limonka 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.