##// END OF EJS Templates
Merged with BB
neko259 -
r1572:99844e4a merge default
parent child Browse files
Show More
@@ -1,81 +1,81 b''
1 1 # INTRO #
2 2
3 3 The API is provided to query the data from a neaboard server by any client
4 4 application.
5 5
6 6 Tha data is returned in the json format and got by an http query.
7 7
8 8 # METHODS #
9 9
10 10 ## Threads ##
11 11
12 12 /api/threads/N/?offset=M&tag=O
13 13
14 14 Get a thread list. You will get ``N`` threads (required parameter) starting from
15 15 ``M``th one (optional parameter, default is 0) with the tag ``O`` (optional parameter,
16 16 threads with any tags are shown by default).
17 17
18 18 ## Tags ##
19 19
20 20 /api/tags/
21 21
22 22 Get all active tag list. Active tag is a tag that has at least 1 active thread
23 23 associated with it.
24 24
25 25 ## Thread ##
26 26
27 27 /api/thread/N/
28 28
29 29 Get all ``N``th thread post. ``N`` is an opening post ID for the thread.
30 30
31 31 Output format:
32 32
33 33 * ``posts``: list of posts
34 34 * ``last_update``: last update timestamp
35 35
36 36 ## Thread diff ##
37 37
38 38 /api/diff_thread
39 39
40 40 Parameters:
41 41
42 42 * ``thread``: thread id
43 43 * ``last_update``: last update timestamp
44 44 * ``last_post``: last added post id
45 45
46 Get the diff of the thread in the `O``
46 Get the diff of the thread in the ``O``
47 47 format. 2 formats are available: ``html`` (used in AJAX thread update) and
48 48 ``json``. The default format is ``html``. Return list format:
49 49
50 50 * ``added``: list of added posts
51 51 * ``updated``: list of updated posts
52 52 * ``last_update``: last update timestamp
53 53
54 54 ## Notifications ##
55 55
56 56 /api/notifications/<username>/[?last=<id>]
57 57
58 58 Get user notifications for user starting from the post ID.
59 59
60 60 * ``username``: name of the notified user
61 61 * ``id``: ID of a last notification post
62 62
63 63 ## General info ##
64 64
65 65 In case of incorrect request you can get http error 404.
66 66
67 67 Response JSON for a post or thread contains:
68 68
69 69 * ``id``
70 70 * ``title``
71 71 * ``text``
72 72 * ``image`` (if image available)
73 73 * ``image_preview`` (if image available)
74 74 * ``bump_time`` (for threads)
75 75
76 76 In future, it will also contain:
77 77
78 78 * tags list (for thread)
79 79 * publishing time
80 80 * bump time
81 81 * reply IDs (if available)
General Comments 0
You need to be logged in to leave comments. Login now