holmesal / ESTransponder

Crazy bluetooth transponder class
5 stars 0 forks source link

REST API spec #11

Open holmesal opened 10 years ago

holmesal commented 10 years ago

This server currently lives at transponder.mtnlab.io

This is a living document of the RESTful endpoints. Everything uses JSON.

POST /sighting Request: an array of Sighting objects.

[
    {     
         beaconID: String
         sighted: String
         rssi: Integer
         timestamp: Double (unix time)
    }
]

POST /auth Request:

{     
    linkedinAuthCode: String
}

Response:

{     
    firebaseToken: String
}
DogsForArms commented 10 years ago

Great jorb. After a dog walk I will implement the data aggregation method.

DogsForArms commented 10 years ago

RSSI will use the last known RSSI if !RSSI

DogsForArms commented 10 years ago

timestamp is a double though.

DogsForArms commented 10 years ago

Looks good with the posting queue, we need the auth + fetch thing now.

holmesal commented 10 years ago

@DogsForArms updated with the new endpoint above. Anything else you need?

holmesal commented 10 years ago

Updated. Now we'll be returning both uuid and beaconID with an auth request, and when that user sights someone else, they'll pass their uuid along with the sighted broadcaster's beaconID (previously, they passed their beaconID).

holmesal commented 10 years ago

ping @DogsForArms

FYI - this is the new spec I mentioned earlier.