Commit eb7bdd66 authored by 杨培's avatar 杨培

论坛增加关注接口

parent ed3f6baa
...@@ -10,6 +10,7 @@ use internalApi\bbs\User; ...@@ -10,6 +10,7 @@ use internalApi\bbs\User;
require __DIR__.'/_init.php'; require __DIR__.'/_init.php';
\internalApi\bbs\Test::setDebug(true); User::setDebug();
$data = \internalApi\bbs\Test::index('123123'); User::follow(12, 31, true);
print_r($data);
\ No newline at end of file //print_r($data);
\ No newline at end of file
...@@ -108,11 +108,12 @@ class User extends Client ...@@ -108,11 +108,12 @@ class User extends Client
* @param bool $silent 是否静默关注,是则不会发送消息提示,默认否 * @param bool $silent 是否静默关注,是则不会发送消息提示,默认否
* @return void * @return void
* @throws \internalApi\base\ApiException * @throws \internalApi\base\ApiException
* 异常code:1 代表不能关注自己,2 代表不能关注此人,3 代表已经关注了,其它 code 为异常情况
* @throws \internalApi\base\ClientException * @throws \internalApi\base\ClientException
*/ */
public static function follow($uid, $followUid, $silent=false) public static function follow($uid, $followUid, $silent=false)
{ {
return self::call('user.follow', compact('uid', 'followUid')); return self::call('user.follow', compact('uid', 'followUid', 'silent'));
} }
/** /**
......
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