Commit c21dee43 authored by 夏彬's avatar 夏彬

添加thread api

parent 1f22b4eb
<?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
......@@ -13,29 +13,38 @@ use internalApi\base\Client;
class Thread extends Client
{
public static function getHotThreads($num=1)
public static function getHotThreads($num = 1)
{
return self::call('thread.getHotThreads', compact('num'));
}
/**
* 获取指定用户发表的帖子的数量
* @param int $uid
* @return int
*/
/**
* 获取指定用户发表的帖子的数量
* @param int $uid
* @return int
*/
public static function countThreads($uid)
{
return self::call('thread.countThreads', compact('uid'));
}
/**
* 根据帖子ID获取帖子信息
* @param int $tid
* @return array|null
*/
/**
* 根据帖子ID获取帖子信息
* @param int $tid
* @return array|null
*/
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment