summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-05-19 09:21:43 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-05-19 09:21:43 +0800
commitf6feb9cfe3a0eaaee60523a098cf92a7410de91d (patch)
tree7060e7d43e7cd9e5dbb336de0239b4042d02155a
parent0769eaf9f67be2d200e976d74f0fa8d6e82c7c24 (diff)
downloadpttbbs-f6feb9cfe3a0eaaee60523a098cf92a7410de91d.tar
pttbbs-f6feb9cfe3a0eaaee60523a098cf92a7410de91d.tar.gz
pttbbs-f6feb9cfe3a0eaaee60523a098cf92a7410de91d.tar.bz2
pttbbs-f6feb9cfe3a0eaaee60523a098cf92a7410de91d.tar.lz
pttbbs-f6feb9cfe3a0eaaee60523a098cf92a7410de91d.tar.xz
pttbbs-f6feb9cfe3a0eaaee60523a098cf92a7410de91d.tar.zst
pttbbs-f6feb9cfe3a0eaaee60523a098cf92a7410de91d.zip
*** empty log message ***
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@867 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/pttpi/README4
-rw-r--r--pttbbs/pttpi/doc/spec50
2 files changed, 54 insertions, 0 deletions
diff --git a/pttbbs/pttpi/README b/pttbbs/pttpi/README
new file mode 100644
index 00000000..8f60ff6c
--- /dev/null
+++ b/pttbbs/pttpi/README
@@ -0,0 +1,4 @@
+PTT Programming Interface
+
+這目前還是一個實驗性的東西,
+它還不穩定, 沒有效率, 沒有經過完整測試, 並且 spec 還在編修中.
diff --git a/pttbbs/pttpi/doc/spec b/pttbbs/pttpi/doc/spec
new file mode 100644
index 00000000..e1460030
--- /dev/null
+++ b/pttbbs/pttpi/doc/spec
@@ -0,0 +1,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}
+