API v1.0 - RandoApp/Rando GitHub Wiki

##Authentication ####Facebook oAuth 2.0 GET /auth/facebook

####Sign in (Sign up) with login and password POST /[email protected]&password=password

Parameters:

  1. username
  2. password

Response

TODO

####Anonymously TODO: Describe why use API anonymously is a bad idea.

##User ####Fetch all user data GET /user

Response

{
    email: "[email protected],
    foods: [{
        user: {
            location: {
                lat: "3333",
                long: "4444"
            },
            food: "3316/3316b4012015b0d8b1df90ba4db75d5571504afe.png"
            map: "945f/945fa9bc3027d7025e3de4a72fcfe7077bfbfaf9.png"
            bonAppetit: true
        },
        stranger: {
            location: {
                lat: "5555",
                long: "6666"
            },
            food: "1d35/1d35f2311a9ebc286d2b611274af615b5eaa9205.png"
            map: "4407/44071ffd4a05286a6926e45d38d831ab0845e133.png"
            bonAppetit: true
        }
    }]
}

##Image

####Get image by id

GET /image/:id

Response

HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Type: image/png
Content-Length: IMAGE_LENGTH

####Upload image POST /image?lat=3333&long=4444

Parameters:

  1. lat
  2. long

Response

TODO

##Report TODO: Describe when report and why? ####Report image POST /report/:id

Response

TODO

Response

TODO