SDKApi.ts 3.86 KB
import SDKHttp from "./SDKHttp";
import { VersionHost, HostKeys } from "../base/SDKConst";
import DataService from "../service/DataService";


export class SDKApi {

    public static Version = (...args) => SDKHttp.httpPost(`${VersionHost}`, ...args);

    //GameApi
    public static ShareList = (...args) => SDKHttp.httpPost(`${DataService.I.GameApi}${HostKeys.ShareList}`, ...args);

    public static getConfig = (...args) => SDKHttp.httpPost(`${DataService.I.GameApi}${HostKeys.getConfig}`, ...args);
    //订阅
    public static subscribe = (...args) => SDKHttp.httpPost(`${DataService.I.GameApi}${HostKeys.subscribe}`, ...args);
    //
    public static saveData = (...args) => SDKHttp.httpPost(`${DataService.I.GameApi}${HostKeys.saveData}`, ...args);
    public static getData = (...args) => SDKHttp.httpPost(`${DataService.I.GameApi}${HostKeys.getData}`, ...args);
    //排行榜添加分数 废弃
    public static rankAdd = (...args) => SDKHttp.httpPost(`${DataService.I.GameApi}${HostKeys.rankAdd}`, ...args);
    //排行榜添加分数
    public static totalrankAdd = (...args) => SDKHttp.httpPost(`${DataService.I.GameApi}${HostKeys.totalrankAdd}`, ...args);
    //排行榜 废弃
    public static rankList = (...args) => SDKHttp.httpPost(`${DataService.I.GameApi}${HostKeys.rankList}`, ...args);
    //排行榜
    public static totalrankList = (...args) => SDKHttp.httpPost(`${DataService.I.GameApi}${HostKeys.totalrankList}`, ...args);
    //广告计划列表
    public static adList = (...args) => SDKHttp.httpPost(`${DataService.I.GameApi}${HostKeys.adList}`, ...args);
    //
    public static behavior = (...args) => SDKHttp.httpPost(`${DataService.I.GameApi}${HostKeys.behavior}`, ...args);


    //LoginApi
    public static Login = (...args) => SDKHttp.httpPost(`${DataService.I.LoginApi}${HostKeys.Login}`, ...args);

    public static reftoken = (...args) => SDKHttp.httpPost(`${DataService.I.LoginApi}${HostKeys.Reftoken}`, ...args);

    public static weakLogin = (...args) => SDKHttp.httpPost(`${DataService.I.LoginApi}${HostKeys.weakLogin}`, ...args);


    //DotApi
    // public static dot = (...args) => SDKHttp.httpGet(`${DataService.I.DotApi}${HostKeys.Dot}`, ...args);

    public static logOut = (...args) => SDKHttp.httpGet(`${DataService.I.DotApi}${HostKeys.logOut}`, ...args);

    public static loadingFinish = (...args) => SDKHttp.httpGet(`${DataService.I.DotApi}${HostKeys.loadingFinish}`, ...args);

    public static active = (...args) => SDKHttp.httpGet(`${DataService.I.DotApi}${HostKeys.Active}`, ...args);

    public static share = (...args) => SDKHttp.httpGet(`${DataService.I.DotApi}${HostKeys.Share}`, ...args);

    public static adStat = (...args) => SDKHttp.httpGet(`${DataService.I.DotApi}${HostKeys.AdStat}`, ...args);

    public static stay = (...args) => SDKHttp.httpGet(`${DataService.I.DotApi}${HostKeys.stay}`, ...args);

    public static behaviors = (...args) => SDKHttp.httpGet(`${DataService.I.DotApi}${HostKeys.behaviors}`, ...args);

    public static dot = (...args) => SDKHttp.httpGet(`${DataService.I.DotApi}${HostKeys.dot}`, ...args);

    public static jumps = (...args) => SDKHttp.httpGet(`${DataService.I.DotApi}${HostKeys.jumps}`, ...args);

    public static level = (...args) => SDKHttp.httpGet(`${DataService.I.DotApi}${HostKeys.level}`, ...args);
    
    public static role = (...args) => SDKHttp.httpGet(`${DataService.I.DotApi}${HostKeys.role}`, ...args);
    
    public static client_log = (...args) => SDKHttp.httpGet(`${DataService.I.DotApi}${HostKeys.client_log}`, ...args);


    // OrderApi 
    public static pay = (...args) => SDKHttp.httpPost(`${DataService.I.OrderApi}${HostKeys.orderReport}`, ...args);
    public static orderQuery = (...args) => SDKHttp.httpPost(`${DataService.I.OrderApi}${HostKeys.orderQuery}`, ...args);
    public static preorder = (...args) => SDKHttp.httpPost(`${DataService.I.OrderApi}${HostKeys.preorder}`, ...args);
}