tsapi.md 18 KB

TSRPC API 接口文档

通用说明

  • 所有请求方法均为 POST
  • 所有请求均需加入以下 Header :
    • Content-Type: application/json

目录


admin

addBuMa

路径

  • POST /admin/addBuMa

请求

interface ReqaddBuMa {
    id: string,
    addCount: number
}

响应

interface ResaddBuMa {
    order10Back: any
}

配置

{
  "connet": "admin"
}

addCode

路径

  • POST /admin/addCode

请求

interface ReqaddCode {
    param: any
}

响应

interface ResaddCode {
    order10Back: any
}

配置

{
  "connet": "admin"
}

addMail

路径

  • POST /admin/addMail

请求

interface ReqaddMail {
    params: any
}

响应

interface ResaddMail {
    order10Back: any
}

配置

{
  "connet": "admin"
}

cacheVer

路径

  • POST /admin/cacheVer

请求

interface ReqcacheVer {

}

响应

interface RescacheVer {
    order10Back: any
}

配置

{
  "connet": "admin"
}

deleteCode

路径

  • POST /admin/deleteCode

请求

interface ReqdeleteCode {
    id: string
}

响应

interface ResdeleteCode {
    order10Back: any
}

配置

{
  "connet": "admin"
}

deleteMail

路径

  • POST /admin/deleteMail

请求

interface ReqdeleteMail {
    id: string
}

响应

interface ResdeleteMail {
    order10Back: any
}

配置

{
  "connet": "admin"
}

deleteQuFu

路径

  • POST /admin/deleteQuFu

请求

interface ReqdeleteQuFu {
    sid: string
}

响应

interface ResdeleteQuFu {
    order10Back: any
}

配置

{
  "connet": "admin"
}

deleteSetting

路径

  • POST /admin/deleteSetting

请求

interface ReqdeleteSetting {
    key: string
}

响应

interface ResdeleteSetting {
    order10Back: any
}

配置

{
  "connet": "admin"
}

getCode

路径

  • POST /admin/getCode

请求

interface ReqgetCode {

}

响应

interface ResgetCode {
    order10Back: any
}

配置

{
  "connet": "admin"
}

getCodeMa

路径

  • POST /admin/getCodeMa

请求

interface ReqgetCodeMa {
    id: string
}

响应

interface ResgetCodeMa {
    order10Back: any
}

配置

{
  "connet": "admin"
}

getMail

路径

  • POST /admin/getMail

请求

interface ReqgetMail {

}

响应

interface ResgetMail {
    order10Back: any
}

配置

{
  "connet": "admin"
}

getNeed

路径

  • POST /admin/getNeed

请求

interface ReqgetNeed {
    stime: number,
    timeInterval: number
}

响应

interface ResgetNeed {
    order10Back: any
}

配置

{
  "connet": "admin"
}

getQuFu

路径

  • POST /admin/getQuFu

请求

interface ReqgetQuFu {

}

响应

interface ResgetQuFu {
    order10Back: any
}

配置

{
  "connet": "admin"
}

getSetting

路径

  • POST /admin/getSetting

请求

interface ReqgetSetting {

}

响应

interface ResgetSetting {
    order10Back: any
}

配置

{
  "connet": "admin"
}

getVer

路径

  • POST /admin/getVer

请求

interface ReqgetVer {

}

响应

interface ResgetVer {
    order10Back: any
}

配置

{
  "connet": "admin"
}

huodongAdd

路径

  • POST /admin/huodongAdd

请求

interface ReqhuodongAdd {
    params: any
}

响应

interface ReshuodongAdd {
    order10Back: any
}

配置

{
  "connet": "admin"
}

huodongDelete

路径

  • POST /admin/huodongDelete

请求

interface ReqhuodongDelete {
    id: string
}

响应

interface ReshuodongDelete {
    order10Back: any
}

配置

{
  "connet": "admin"
}

huodongEdit

路径

  • POST /admin/huodongEdit

请求

interface ReqhuodongEdit {
    id: string,
    params: any
}

响应

interface ReshuodongEdit {
    order10Back: any
}

配置

{
  "connet": "admin"
}

huodongFind

路径

  • POST /admin/huodongFind

请求

interface ReqhuodongFind {
    key?: string,
    hdcid?: string
}

响应

interface ReshuodongFind {
    order10Back: any
}

配置

{
  "connet": "admin"
}

updateMail

路径

  • POST /admin/updateMail

请求

interface RequpdateMail {
    id: string,
    params: any
}

响应

interface ResupdateMail {
    order10Back: any
}

配置

{
  "connet": "admin"
}

updateQuFu

路径

  • POST /admin/updateQuFu

请求

interface RequpdateQuFu {
    sid: string,
    param: { [key: string]: any }
}

响应

interface ResupdateQuFu {
    order10Back: any
}

配置

{
  "connet": "admin"
}

updateSetting

路径

  • POST /admin/updateSetting

请求

interface RequpdateSetting {
    key: string,
    param: any
}

响应

interface ResupdateSetting {
    order10Back: any
}

配置

{
  "connet": "admin"
}

xiazai

路径

  • POST /admin/xiazai

请求

interface Reqxiazai {
    id: string
}

响应

interface Resxiazai {
    order10Back: any
}

配置

{
  "connet": "admin"
}

chat

请求接口

路径

  • POST /chat/ChatSend

请求

interface ReqChatSend {
    type: "hefu",
    str: string
}

响应

interface ResChatSend {
    [key: string]: {
        id: number,
        type: "hefu",
        fuuid: string,
        fuser: {
            uuid: string,
            sid: string,
            name: string,
            head: string,
            wxhead: string,
            sex: number,
            level: number,
            exp: number,
            power: number
        },
        msg: string,
        time: number
    }
}

配置

{
  "connet": "ws"
}

eps

获取属性信息

路径

  • POST /eps/EpsInfo

请求

interface ReqEpsInfo {

}

响应

interface ResEpsInfo {
    [key: string]: number
}

配置

{
  "connet": "ws"
}

fight

请求接口 合成战斗

路径

  • POST /fight/FightHc

请求

interface ReqFightHc {
    gzid: string
}

响应

interface ResFightHc {
    list: {
        [key: string]: {
            type: 0 | 2 | 3 | 4 | 50 | 51,
            unlock: 1 | 0,
            correlationId: number
        }
    },
    /** 战斗初始阵容 */
    fightStart: {
        from: string,
        seed: number,
        teams: {
            [key: string]: {
                fid: string,
                seat: number,
                eps: { [key: string]: number }
            }
        }
    },
    win: number,
    log: {
        [key: string]: {
            /** 战斗动作类型 */
            aType: "wu" | "0" | "1" | "2" | "3" | "999",
            seat: number,
            /** 日志格式 */
            atker: {
                iid: string,
                hp: number,
                buff: [string, number][],
                effect: [string, number][]
            },
            target: {
                iid: string,
                hp: number,
                buff: [string, number][],
                effect: [string, number][]
            }[]
        }[]
    }
}

配置

{
  "connet": "ws"
}

请求接口

路径

  • POST /fight/FightTest

请求

interface ReqFightTest {

}

响应

interface ResFightTest {
    /** 战斗初始阵容 */
    fightStart: {
        from: string,
        seed: number,
        teams: {
            [key: string]: {
                fid: string,
                seat: number,
                eps: { [key: string]: number }
            }
        }
    },
    win: number,
    log: {
        [key: string]: {
            /** 战斗动作类型 */
            aType: "wu" | "0" | "1" | "2" | "3" | "999",
            seat: number,
            /** 日志格式 */
            atker: {
                iid: string,
                hp: number,
                buff: [string, number][],
                effect: [string, number][]
            },
            target: {
                iid: string,
                hp: number,
                buff: [string, number][],
                effect: [string, number][]
            }[]
        }[]
    }
}

配置

{
  "connet": "ws"
}

hc

请求接口 点击发射器

路径

  • POST /hc/HcEmit

请求

interface ReqHcEmit {
    gzid: string
}

响应

interface ResHcEmit {
    [key: string]: {
        type: 0 | 2 | 3 | 4 | 50 | 51,
        unlock: 1 | 0,
        correlationId: number
    }
}

配置

{
  "connet": "ws"
}

获取合成信息

路径

  • POST /hc/HcInfo

请求

interface ReqHcInfo {

}

响应

interface ResHcInfo {
    chapterId: number,
    tili: number,
    maxTili: number,
    lastTime: number,
    list: {
        [key: string]: {
            type: 0 | 2 | 3 | 4 | 50 | 51,
            unlock: 1 | 0,
            correlationId: number
        }
    }
}

配置

{
  "connet": "ws"
}

点击两个格子合成

路径

  • POST /hc/HcMerge

请求

interface ReqHcMerge {
    gzid1: string,
    gzid2: string
}

响应

interface ResHcMerge {
    list: {
        [key: string]: {
            type: 0 | 2 | 3 | 4 | 50 | 51,
            unlock: 1 | 0,
            correlationId: number
        }
    },
    items: number[][]
}

配置

{
  "connet": "ws"
}

item

获取道具信息

路径

  • POST /item/ItemInfo

请求

interface ReqItemInfo {

}

响应

interface ResItemInfo {
    [key: string]: number
}

配置

{
  "connet": "ws"
}

mail

请求接口

路径

  • POST /mail/MailDelAll

请求

interface ReqMailDelAll {

}

响应

interface ResMailDelAll {
    [key: string]: { ets: number }
}

配置

{
  "connet": "ws"
}

请求接口

路径

  • POST /mail/MailDelOne

请求

interface ReqMailDelOne {
    id: string
}

响应

interface ResMailDelOne {
    [key: string]: { ets: number }
}

配置

{
  "connet": "ws"
}

请求邮件信息

路径

  • POST /mail/MailInfo

请求

interface ReqMailInfo {

}

响应

interface ResMailInfo {
    [key: string]: {
        id: string,
        title: string,
        content: string,
        items: number[][],
        fts: number,
        rts: number,
        ets: number,
        dts: number
    }
}

配置

{
  "connet": "ws"
}

请求接口

路径

  • POST /mail/MailRwdAll

请求

interface ReqMailRwdAll {

}

响应

interface ResMailRwdAll {
    [key: string]: { rts: number }
}

配置

{
  "connet": "ws"
}

请求接口

路径

  • POST /mail/MailRwdOne

请求

interface ReqMailRwdOne {
    id: string
}

响应

interface ResMailRwdOne {
    [key: string]: { rts: number }
}

配置

{
  "connet": "ws"
}

plat

平台登录

路径

  • POST /plat/PlatLogin

请求

interface ReqPlatLogin {
    pid: string,
    param: string[]
}

响应

interface ResPlatLogin {
    openId: string,
    token: string,
    noticeWais: {
        type: number,
        title: string,
        content: string
    }[]
}

配置

{
  "connet": "http"
}

player

账号登录

路径

  • POST /player/PlayerLogin

请求

interface ReqPlayerLogin {
    pid: string,
    openId: string,
    lang: string,
    plat: string,
    device: string,
    parms: string[]
}

响应

interface ResPlayerLogin {
    uid: string,
    sid: string,
    list: {
        [key: string]: {
            uuid: string,
            name: string,
            level: number,
            lastlogin: number
        }
    },
    token: string,
    qufuList: {
        [key: string]: {
            sid: string,
            name: string,
            sName: string,
            openAt: number,
            status: string,
            heid: string,
            suofu: string,
            skin: string
        }
    },
    switch: { [key: string]: any },
    orderList: {
        [key: string]: {
            rmb: number,
            money: number,
            desc: string,
            iid: string,
            daibi: number
        }
    },
    wsUrl: string
}

配置

{
  "connet": "http"
}

task

获取主线任务

路径

  • POST /task/TaskInfo

请求

interface ReqTaskInfo {

}

响应

interface ResTaskInfo {
    id: number,
    cons: number
}

配置

{
  "connet": "ws"
}

请求领取任务奖励

路径

  • POST /task/TaskRwd

请求

interface ReqTaskRwd {

}

响应

interface ResTaskRwd {
    id: number,
    cons: number
}

配置

{
  "connet": "ws"
}

user

角色登录

路径

  • POST /user/UserLogin

请求

interface ReqUserLogin {
    sid: string,
    uid: string,
    token: string
}

响应

interface ResUserLogin {
    uuid: string,
    sid: string,
    name: string,
    head: string,
    wxhead: string,
    sex: number,
    level: number,
    exp: number,
    regtime: number,
    loginTime: number,
    lastlogin: number,
    lang: string,
    iscz: number,
    rmbcz: number,
    power: number
}

配置

{
  "connet": "ws"
}

请求接口 获取内部公告

路径

  • POST /user/UserNotices

请求

interface ReqUserNotices {

}

响应

interface ResUserNotices {
    notices: {
        type: number,
        title: string,
        content: string
    }[]
}

配置

{
  "connet": "ws"
}

角色改名

路径

  • POST /user/UserSetName

请求

interface ReqUserSetName {
    name: string
}

响应

interface ResUserSetName {
    name: string
}

配置

{
  "connet": "ws"
}

请求接口 使用兑换码

路径

  • POST /user/UserUseCode

请求

interface ReqUserUseCode {
    key: string
}

响应

interface ResUserUseCode {

}

配置

{
  "connet": "ws"
}