-
Notifications
You must be signed in to change notification settings - Fork 2
/
endpoint_info.txt
48 lines (40 loc) · 2.22 KB
/
endpoint_info.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
addHouse endpoint
https://us-central1-ridr-cc2ec.cloudfunctions.net/addHouse
Intended use:
https://us-central1-ridr-cc2ec.cloudfunctions.net/addHouse?text=yourHouseJson
where yourHouseJson is a string like {"lat": 1.52, "long": 2.55, "ffe": ......} (intended format as specified by deliverable 2)
"ffe" and onward can be whatever you want if you want to change but the "lat" and "long" must stay at the base level of the json
example query:
https://us-central1-ridr-cc2ec.cloudfunctions.net/addHouse?text={"lat": 1.52, "long": 2.55, "otherHouseInfo": "heyhey"}
getHouses endpoint
https://us-central1-ridr-cc2ec.cloudfunctions.net/getHouses
returns a json in intended format as specified by deliverable 2
login endpoint
https://us-central1-ridr-cc2ec.cloudfunctions.net/login
intended use:
https://us-central1-ridr-cc2ec.cloudfunctions.net/login?username=myname&password=mypassword
where myname and mypassword are name and passwords
updateHouse endpoint
https://us-central1-ridr-cc2ec.cloudfunctions.net/updateHouse
intended:
https://us-central1-ridr-cc2ec.cloudfunctions.net/updateHouse?text=yourNewHouseJson
where yourNewHouseJson is a json for a house with updated values.
Intended for you to find a house to update with getHouses and then modify the json given to you for that house.
However, you must leave lat and long untouched as these are used to identify the house to update.
addUser endpoint
https://us-central1-ridr-cc2ec.cloudfunctions.net/login?username=myname&password=mypassword
where myname and mypassword are name and passwords
returns 403 if username already exists
else 200
addLandlord
https://us-central1-ridr-cc2ec.cloudfunctions.net/addLandlord?text=yourLandlordJson
{"name": james, "other keys": eoimsfe, fokfewopk}
"name" must exist, is used as primary identifier (yes, lazy, but good enough for our need)
updateLandlord
https://us-central1-ridr-cc2ec.cloudfunctions.net/updateLandlord?text=yourNewLandlordJSON
where yourNewLandlordJSON is a json for a landlord with updated values.
getLandlords
https://us-central1-ridr-cc2ec.cloudfunctions.net/getLandlords
returns a json with all landlords
https://us-central1-ridr-cc2ec.cloudfunctions.net/getPropertyStats
returns property stats (we need to populate db with valid data before this works)