UNPKG

@ginstone/nga-api

Version:

41 lines (40 loc) 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.findApi = exports.NgaPhpApi = void 0; var NgaPhpApi; (function (NgaPhpApi) { /** * 查询主题 */ NgaPhpApi["thread"] = "thread.php"; /** * 查询主题内容 */ NgaPhpApi["read"] = "read.php"; /** * 综合操作 */ NgaPhpApi["nuke"] = "nuke.php"; /** * 版面操作 */ NgaPhpApi["forum"] = "forum.php"; /** * 回复 */ NgaPhpApi["post"] = "post.php"; })(NgaPhpApi = exports.NgaPhpApi || (exports.NgaPhpApi = {})); const findApi = (url) => { if (url.includes(NgaPhpApi.thread)) return NgaPhpApi.thread; if (url.includes(NgaPhpApi.read)) return NgaPhpApi.read; if (url.includes(NgaPhpApi.nuke)) return NgaPhpApi.nuke; if (url.includes(NgaPhpApi.forum)) return NgaPhpApi.forum; if (url.includes(NgaPhpApi.post)) return NgaPhpApi.post; return undefined; }; exports.findApi = findApi;