FocusData.php 1023 Bytes
<?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);
    }

}