Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wxh_internal_api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
杨培培
wxh_internal_api
Commits
c9c873fe
Commit
c9c873fe
authored
Oct 12, 2017
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提供获取用论坛帖子信息的接口
parent
85991b8d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
bbs_basic.php
example/bbs_basic.php
+3
-1
Thread.php
src/bbs/Thread.php
+16
-0
No files found.
example/bbs_basic.php
View file @
c9c873fe
...
@@ -6,5 +6,7 @@ require __DIR__.'/_init.php';
...
@@ -6,5 +6,7 @@ require __DIR__.'/_init.php';
Thread
::
setDebug
(
true
);
Thread
::
setDebug
(
true
);
$thread
=
Thread
::
getHotThreads
(
5
);
//$thread = Thread::getHotThreads(5);
$thread
=
Thread
::
info
(
25
);
print_r
(
$thread
);
print_r
(
$thread
);
\ No newline at end of file
src/bbs/Thread.php
View file @
c9c873fe
...
@@ -18,8 +18,24 @@ class Thread extends Client
...
@@ -18,8 +18,24 @@ class Thread extends Client
return
self
::
call
(
'thread.getHotThreads'
,
compact
(
'num'
));
return
self
::
call
(
'thread.getHotThreads'
,
compact
(
'num'
));
}
}
/**
* 获取指定用户发表的帖子的数量
* @param int $uid
* @return int
*/
public
static
function
countThreads
(
$uid
)
public
static
function
countThreads
(
$uid
)
{
{
return
self
::
call
(
'thread.countThreads'
,
compact
(
'uid'
));
return
self
::
call
(
'thread.countThreads'
,
compact
(
'uid'
));
}
}
/**
* 根据帖子ID获取帖子信息
* @param int $tid
* @return array|null
*/
public
static
function
info
(
$tid
)
{
return
self
::
call
(
'thread.info'
,
compact
(
'tid'
));
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment