zuzannast / huntee

Web endpoint for a treasure hunt game. It allows participants to send requests containing their current position (latitude and longitude in decimal representation) and email.

Home Page:http://huntee.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Huntee

This is a web endpoint for a treasure hunt game. It allows participants to send requests 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:

“Hey, you’ve found a treasure, congratulations!”

Treasure location: 50.063617 N, 19.931784 E

Request format:

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

Example request:

POST /hunt/current_location[]=0&current_location[]=0&email=test@example.com

Demo

http://huntee.herokuapp.com

Configuration

  • Emails: Setup your ENV and ENV variables to send emails in development.

  • DB: Just run rake db:migrate.

  • POST: You can send request through

    curl -X POST -d current_location[]=50.051221&current_location[]=19.945610&email=zuzanna.st@gmail.com" http://localhost:3000/hunts

About

Web endpoint for a treasure hunt game. It allows participants to send requests containing their current position (latitude and longitude in decimal representation) and email.

http://huntee.herokuapp.com


Languages

Language:Ruby 92.7%Language:CSS 2.9%Language:JavaScript 2.2%Language:HTML 1.5%Language:CoffeeScript 0.7%