summaryrefslogtreecommitdiffstats
path: root/pttpi/doc/spec
blob: e146003037e0ca2fa94adef6ae07f229722e03e9 (plain) (blame)
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
board.getBid    get bid from board name
input   (s)
    (board name)
output  ({s:i, s:s, s:i})
    {errno   => errno,
     brdname => boardname,
     bid     => boardid} (bid = -1 if error)


board.getBrdInfo
get board information (by bid)
input   (i)
    (bid)
output  ({s:i,s:s,s:i,s:6,s:6,s:i})
    {errno   => errno,
     brdname => boardname
     bid     => bid,
     title   => title (Base64),
     BM      => board manager(s) (Base64),
     nuser   => #users in this board,
    }

board.getNarticle
get # articles in the board
input   (i)
    (bid)
output  ({s:i, s:s, s:i})
    {errno    => errno,
     narticle => #articles in the board}

article.list
get article list of bid
input   (ii)
    (bid, from # article)
output: ({s:i,s:s,s:i,s:s,s:s,s:6}...)
    [{articleid => article id,
      filename  => file name,
      recommend => recommend,
      owner     => owner's userid,
      date      => date (format: mm/dd),
      title     => article title (Base64)},
     {...},...]

article.readfn
read article by bid and filename
input   (is)
    (bid, filename)
output  ({s:6})
    {content => content}