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
c21dee43
Commit
c21dee43
authored
Nov 20, 2017
by
夏彬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加thread api
parent
1f22b4eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
12 deletions
+35
-12
bbs_thread.php
example/bbs_thread.php
+14
-0
Thread.php
src/bbs/Thread.php
+21
-12
No files found.
example/bbs_thread.php
0 → 100644
View file @
c21dee43
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 11/09/2017
* Time: 11:54 AM
*/
use
internalApi\bbs\Thread
;
require
__DIR__
.
'/_init.php'
;
Thread
::
setDebug
(
true
);
print_r
(
Thread
::
getUnresolveQustion
());
\ No newline at end of file
src/bbs/Thread.php
View file @
c21dee43
...
@@ -13,29 +13,38 @@ use internalApi\base\Client;
...
@@ -13,29 +13,38 @@ use internalApi\base\Client;
class
Thread
extends
Client
class
Thread
extends
Client
{
{
public
static
function
getHotThreads
(
$num
=
1
)
public
static
function
getHotThreads
(
$num
=
1
)
{
{
return
self
::
call
(
'thread.getHotThreads'
,
compact
(
'num'
));
return
self
::
call
(
'thread.getHotThreads'
,
compact
(
'num'
));
}
}
/**
/**
* 获取指定用户发表的帖子的数量
* 获取指定用户发表的帖子的数量
* @param int $uid
* @param int $uid
* @return int
* @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获取帖子信息
* 根据帖子ID获取帖子信息
* @param int $tid
* @param int $tid
* @return array|null
* @return array|null
*/
*/
public
static
function
info
(
$tid
)
public
static
function
info
(
$tid
)
{
{
return
self
::
call
(
'thread.info'
,
compact
(
'tid'
));
return
self
::
call
(
'thread.info'
,
compact
(
'tid'
));
}
/**
* 获取未解决问题数量
* @return mixed
*/
public
static
function
getUnresolveQustion
()
{
return
self
::
call
(
'thread.getUnresolveQustion'
);
}
}
}
}
\ 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