Commit c557f60f authored by 谈海涛's avatar 谈海涛

话题置顶interAPI

parent 07c2578a
...@@ -24,6 +24,12 @@ class Label extends Client ...@@ -24,6 +24,12 @@ class Label extends Client
const TYPE_FAULT = 6; // 故障点 const TYPE_FAULT = 6; // 故障点
const TYPE_SPECIAL_TOPIC = 7; // 专题 const TYPE_SPECIAL_TOPIC = 7; // 专题
// 1=>thread 2=>moment 3=>course 4=>section
const FROM_THREAD = 1;
const FROM_MOMENT = 2;
const FROM_COURSE = 3;
const FROM_SECTION = 4;
/** /**
* @param array/int $type 1=>认证 2=>品类 3=>品牌 * @param array/int $type 1=>认证 2=>品类 3=>品牌
* *
...@@ -49,4 +55,37 @@ class Label extends Client ...@@ -49,4 +55,37 @@ class Label extends Client
return self::call('label.getListByLabels', compact('labels', 'types')); return self::call('label.getListByLabels', compact('labels', 'types'));
} }
/**
* 设置话题置顶
*
* @param int $sid 标记id
* @param array $labelIds 话题id数组
* @param int $endTime 截止时间
* @param string $name 标记名称
* @param int $uid 用户中心uid
* @param int $from 来源
*
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public static function setTopicRoof($sid, $labelIds, $endTime = 0, $name = '', $uid = 0, $from = self::FROM_THREAD) {
return self::call('label.setTopicRoof', compact('sid', 'labelIds', 'endTime', 'name', 'uid', 'from'));
}
/**
* 根据标记id话题置顶数据
*
* @param int $sid 标记id
* @param array $types 标签类型
* @param int $from 来源
*
* @throws \internalApi\base\ApiException
* @throws \internalApi\base\ClientException
*/
public static function getLabelListBySid($sid, $types = [], $from = self::FROM_THREAD) {
return self::call('label.getLabelListBySid', compact('sid', 'types', 'from'));
}
} }
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