FocusData.php
1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace LibModels\Wap\Category;
use Api\Yohobuy;
use Api\Sign;
/**
* 关注数据接口操作类
*
* @name FocusData
* @package Library/LibModels/wap/Category
* @copyright yoho.inc
* @version 1.0 (2015-10-10)
* @author gtskk <rocky.zhang@yoho.cn>
*/
class FocusData
{
/**
* 获取关注数据
*
* @param integ $uid 用户ID
* @param string $gender 性别
* @param integer $limit 读取数目限制,默认为10
* @param integer $page 读取分页限制,默认为1
* @return array 关注数据
*/
public static function getFocusData($uid, $gender, $limit = 10, $page = 1)
{
// 构建必传参数
$param = Yohobuy::param();
$param['uid'] = $uid;
$param['gender'] = $gender;
$param['limit'] = $limit;
$param['page'] = $page;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(SERVICE_URL . 'guang/api/v1/attention/getlist', $param);
}
}