-
Notifications
You must be signed in to change notification settings - Fork 3
/
web_api.txt
62 lines (48 loc) · 1.69 KB
/
web_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
56
57
58
59
60
61
62
### database api, via HTTP(s), REST
## GET only
/api/1/get_directories
# out, text/json: { "Foo Foo": "long description", "Street Art": "Temporary and Semipermanent art" }
## GET only
/api/1/get_points_by_place/(\d+)/(\d+)/(\w+)
# retrieves JSON of closest 1000 items
# 1: latitude
# 2: longitude
# 3: directory name
# out, text/json: array of dicts, which contain id, lat, lon, tags list (which contains arbitrary extensible string data, with id (for reporting) colon keyname colon arbitrary value)
# eg -> /api/1/get_points_by_place/-23.7432381/81.1245616/Street+Art
# <- [ { "id:926,"lat":-23.7243115,"lon":81.21623,"tags":["124:artist:Alice","152:artist:Bob","tagid:tagkey:tagvalue","193:medium:spraypaint","12:title:Aaaht","72:caption:something obsene","991:photo:http://example.com/12341"]}, { "lat":-23.6123112,"lon":81.743255, } ]
## GET only
/api/1/get_points_recently_changed/(\w+)
# 1: directoryname
## POST only
/api/1/assert_point_destroyed
# post params:
# pointid required
# personhint request
## POST only
/api/1/create_point
# post params:
# directory required
# latitude required
# longitude required
# personhint required
# out, text/json: int of new point id, to be used next in add_point_data probably
# eg <- 42
## POST only
/api/1/add_point_tag
# adds a new tag about some point
# post params:
# pointid required
# key reqired
# value required
# personhint required
# out, text/json: str of resulting tagstring
# eg <- "124312:keyname:example example arbitry data including colons after:::first two example"
## POST only
/api/1/report_for_review
# post params:
# personhint required
# tagstring required
# why optional
#
# authored by Chad Miller