@ginstone/nga-api
Version:
280 lines (279 loc) • 9.94 kB
TypeScript
import { UploadParam } from "../params/UploadParam";
import { NgaClient } from "../client/NgaClient";
import { DelAttachParam, FavorAddParam, FavorDelParam, FavorFolderListParam, FavorFolderModifyParam, FavorForumEditParam, MissionCheckInParam, MissionListParam, NoticeEnableParam, PmAddParam, PmKickParam, PmNewParam, PmReadParam, PmReplyParam, ReportParam, SignatureSetParam, TopicRecommendParam, VoteParam } from "../params/NukeParams";
import { BlockSubForumBody } from "../response/nuke/BlockSubForum";
import { CheckInBody, CheckInStatusBody } from "../response/nuke/CheckIn";
import { FavorFolder } from "../response/nuke/FavorFolder";
import { FavorForum } from "../response/nuke/FavorForum";
import { MissionInfo } from "../response/nuke/MissionInfo";
import { MissionCheckIn } from "../response/nuke/MissionCheckIn";
import { NoticeBody } from "../response/nuke/NoticeBody";
import { SimpleUserInfo } from "../response/field/user/SimpleUserInfo";
import { PmListBody, PmReplyBody } from "../response/nuke/PrivateMessage";
import { TopicKey } from "../response/nuke/TopicKey";
import { UserInfoNuke } from "../response/field/user/UserInfoNuke";
import { Medal } from "../response/field/Medal";
import { BlockData, BlockDataBody } from "../response/nuke/BlockData";
import { ItemBuyParam, ItemStoreParam, ItemUseParam } from "../params/ItemParams";
import { ItemData } from "../response/nuke/ItemData";
/**
* nuke.php 的接口
*/
export declare class NukeApi {
/**
* 附件上传
* @param attachUrl 上传地址,从post准备请求中获取
* @param params 上传参数
*/
static attachUpload: (attachUrl: string, params: UploadParam) => Promise<import("../response/body/UploadBody").UploadBody>;
/**
* 删除附件
* @param client 客户端
* @param params 参数
*/
static attachDel: (client: NgaClient, params: DelAttachParam) => Promise<string>;
/**
* 添加子版面屏蔽
* @param client 客户端
* @param fid 父版面id
* @param id 通过ThreadApi获取: 子版面在635版的镜像ID或在主题列表中的主题id
*/
static blockSubForumAdd: (client: NgaClient, fid: number, id: number) => Promise<string>;
/**
* 移除子版面屏蔽
* @param client 客户端
* @param fid 父版面id
* @param id 通过ThreadApi获取: 子版面在635版的镜像ID或在主题列表中的主题id
*/
static blockSubForumDel: (client: NgaClient, fid: number, id: number) => Promise<string>;
/**
* 查询子版面屏蔽情况
* @param client 客户端
* @param fid 父版面id
*/
static blockSubForumList: (client: NgaClient, fid: number) => Promise<BlockSubForumBody>;
/**
* 用户签到
* @param client 客户端
*/
static checkIn: (client: NgaClient) => Promise<CheckInBody>;
/**
* 查询签到状态
* @param client 客户端
*/
static checkInStatus: (client: NgaClient) => Promise<CheckInStatusBody>;
/**
* 查询收藏夹列表
* @param client 客户端
* @param params 参数
*/
static favorFolderList: (client: NgaClient, params: FavorFolderListParam) => Promise<FavorFolder[]>;
/**
* 修改收藏夹
* @param client 客户端
* @param params 参数
*/
static favorFolderModify: (client: NgaClient, params: FavorFolderModifyParam) => Promise<string>;
/**
*查询收藏版面
* @param client 客户端
*/
static favorForumList: (client: NgaClient) => Promise<FavorForum[]>;
/**
* 添加和删除收藏版面
* @param client 客户端
* @param params 参数
*/
static favorForumEdit: (client: NgaClient, params: FavorForumEditParam) => Promise<string>;
/**
* 添加收藏主题和回复
* @param client 客户端
* @param params 参数
*/
static favorTopicAdd: (client: NgaClient, params: FavorAddParam) => Promise<string>;
/**
* 删除收藏的主题和回复
* @param client 客户端
* @param params 参数
*/
static favorTopicDel: (client: NgaClient, params: FavorDelParam) => Promise<string>;
/**
* 检查签到类任务
* @param client 客户端
* @param params 参数
*/
static missionCheckIn: (client: NgaClient, params: MissionCheckInParam) => Promise<MissionCheckIn>;
/**
* 查询任务列表
* @param client 客户端
* @param params 参数
*/
static missionList: (client: NgaClient, params: MissionListParam) => Promise<MissionInfo[]>;
/**
* 清空提醒消息
* @param client 客户端
*/
static noticeClear: (client: NgaClient) => Promise<string>;
/**
* 关闭 / 开启某一楼提醒消息
* @param client 客户端
* @param params 参数
*/
static noticeEnable: (client: NgaClient, params: NoticeEnableParam) => Promise<string>;
/**
* 查询提醒消息
* @param client 客户端
* @param time_limit 时间戳,只返回该时间戳之后的提醒消息
*/
static noticeList: (client: NgaClient, time_limit: number) => Promise<NoticeBody | undefined>;
/**
* 获取当前登录用户提醒信息状态(疑似无效)
* @param client 客户端
*/
static noticeStatus: (client: NgaClient) => Promise<any>;
/**
* 从私信黑名单移除用户
* @param client 客户端
* @param userId 希望移除的用户id
*/
static pmBlockDel: (client: NgaClient, userId: number) => Promise<string>;
/**
* 添加用户到私信黑名单
* @param client 客户端
* @param userId 希望添加的用户id
*/
static pmBlockAdd: (client: NgaClient, userId: number) => Promise<string>;
/**
* 查询私信黑名单
* @param client 客户端
*/
static pmBlockList: (client: NgaClient) => Promise<SimpleUserInfo[]>;
/**
* 向私信会话中添加更多的参与者
* @param client 客户端
* @param params 参数
*/
static pmAdd: (client: NgaClient, params: PmAddParam) => Promise<string>;
/**
* 私信会话踢人
* @param client 客户端
* @param params 参数
*/
static pmKick: (client: NgaClient, params: PmKickParam) => Promise<string>;
/**
* 查询私信列表
* @param client 客户端
* @param page 页数
*/
static pmList: (client: NgaClient, page: number) => Promise<PmListBody>;
/**
* 发送新私信
* @param client 客户端
* @param params 参数
*/
static pmNew: (client: NgaClient, params: PmNewParam) => Promise<string>;
/**
* 查询私信内容
* @param client 客户端
* @param params 参数
*/
static pmRead: (client: NgaClient, params: PmReadParam) => Promise<PmReplyBody>;
/**
* 回复私信
* @param client 客户端
* @param params 参数
*/
static pmReply: (client: NgaClient, params: PmReplyParam) => Promise<string>;
/**
* 点赞或点踩
* @param client 客户端
* @param params 参数
*/
static topicRecommend: (client: NgaClient, params: TopicRecommendParam) => Promise<{
message: string;
value: number;
}>;
/**
* 设置签名
* @param client 客户端
* @param params 参数
*/
static signatureSet: (client: NgaClient, params: SignatureSetParam) => Promise<string>;
/**
* 投票/投注
* @param client 客户端
* @param params 参数
*/
static vote: (client: NgaClient, params: VoteParam) => Promise<string>;
/**
* 查询版面的主题分类
* @param client 客户端
* @param fid 版面id
*/
static topicKeyList: (client: NgaClient, fid: number) => Promise<TopicKey[]>;
/**
* 根据用户id查询用户信息
* @param client 客户端
* @param userId 用户id
*/
static userInfoGetById: (client: NgaClient, userId: number) => Promise<UserInfoNuke>;
/**
* 根据用户名查询用户信息
* @param client 客户端
* @param username 用户名
*/
static userInfoGetByName: (client: NgaClient, username: string) => Promise<UserInfoNuke>;
/**
* 举报
* @param client 客户端
* @param params 参数
*/
static report: (client: NgaClient, params: ReportParam) => Promise<string>;
/**
* 查询徽章信息
* @param client 客户端
* @param subTypes 徽章id
*/
static medalInfoList: (client: NgaClient, subTypes: number[]) => Promise<Medal[]>;
/**
* 查询版面权限信息
* @param client 客户端
* @param forumId 版面id
*/
static privilegeList: (client: NgaClient, forumId: number) => Promise<string>;
/**
* 查询屏蔽数据(用户、关键字)
* @param client 客户端
*/
static blockDataList: (client: NgaClient) => Promise<BlockDataBody>;
/**
* 设置屏蔽数据(用户、关键字)
* @param client 客户端
* @param data 配置信息,来自查询接口
*/
static blockDataSet: (client: NgaClient, data: BlockData) => Promise<string>;
/**
* 查询商店里的道具列表
* @param client 客户端
* @param param 参数
*/
static itemStore: (client: NgaClient, param: ItemStoreParam) => Promise<ItemData>;
/**
* 查询自己的道具列表
* @param client 客户端
* @param page 页数
*/
static itemInventory: (client: NgaClient, page: number) => Promise<ItemData>;
/**
* 购买道具
* @param client 客户端
* @param param 参数
*/
static itemBuy: (client: NgaClient, param: ItemBuyParam) => Promise<string>;
/**
* 使用道具
* @param client 客户端
* @param param 参数
*/
static itemUse: (client: NgaClient, param: ItemUseParam) => Promise<string>;
}