forked from JHurricane96/trashmafia
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapi.txt
55 lines (48 loc) · 1.29 KB
/
api.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
For any error, {'status': 'error', 'message': '...'}
/
/login:
POST
username
password
/register:
POST
name
username
password
address (From google maps autofill, as is)
address coordinates ([13.09123, 80.01293])
subscription type ('weekly', 'monthly', 'twice a year', 'annually')
phone number
email
/pickup
GET
return a list of destinations, to be traversed in that order ({'destinations': [{'id': <Some string here>, address': 'Place1', 'coords': [13.090, 80.09809], 'status': <'visited' or 'not visited'>}, ...]})
/client (?)
/pickup/updatepickup
POST
id of place (received in /pickup)
return {'message': 'success'} if success, else return {'message': 'not calculated routes'} if routes haven't been calculated for the day, else return error
AIzaSyBhGZAQoLq15gOURHWOwq81OSf_nljUZcI
Tables:
clients
name
username
password
address (From google maps autofill, as is)
address coordinates ([13.09123, 80.01293])
address coordinates polyline encoded (a string)
subscription type ('weekly', 'monthly', 'twice a year', 'annually')
phone number
email
pickupMen
_id
username
password
lastTraveled (A UTC timestamp)
pickupLogs
date
pickupmanId
List of locations with timestamps ([{'location': <_id of place in clients>, 'visitedAt': blergh}, ...])
routes
date
routes