user-data.js 624 Bytes
'use strict';

const api = global.yoho.API;

const getVIPInfoByUid = (uid)=>{
    let options = {
        method: 'app.passport.vip',
        uid: uid,
        private_key: '0ed29744ed318fd28d2c07985d3ba633'
    };

    return api.get('', options);
};

const getCouponsList = (uid, type, page, limit)=>{
    page = page || 1;
    type = type || 'notuse';
    limit = limit || 10;

    let options = {
        method: 'app.coupons.lists',
        uid: uid,
        type: type,
        page: page,
        limit: limit
    };

    return api.get('', options);
};

module.exports = {
    getVIPInfoByUid,
    getCouponsList
};