API Endpoints Map
URI | Description | Payload | return |
---|---|---|---|
/ |
Client Page(Mange-Eater-Client-Page) | N/A | text/html |
/channel |
Infomation of Discord Channel | N/A | JSON :ChannelInfo |
/directory |
Infomation of out directory | N/A | JSON :DirectoryOutbound |
/url |
N/A | N/A | none |
/badcompany |
N/A | N/A | testString |
/version |
N/A | N/A | version:string |
/version/info |
N/A | N/A | JSON :VersionInfo |
URI | Description | Payload | return |
---|---|---|---|
/ |
Scraper Start | JSON :RequestBody |
Promise<string> |
/channel |
Change the current Channel | {index:number} |
Promise<string> |
/channel/add |
Add the Discord Channel | {channelID:string} |
Promise<ChannelInfo> 1 |
/directory |
now developing | {checked:Checked[]} |
Promise<string> 2 |
/url |
Scraper Start | {url:string, ifPush:boolean} |
Promise<string> |
/badcompany |
t | JSON :BC_GeneralPayload |
Promise<string> |
/version |
N/A | N/A | N/A |
URI | Description | Payload | return |
---|---|---|---|
/ |
N/A | N/A | N/A |
/channel |
N/A | N/A | N/A |
/channel/add |
N/A | N/A | N/A |
/directory |
Delete Selected Directories | {checked:Checked[]} |
Promise<string> |
/url |
N/A | N/A | N/A |
/badcompany |
N/A | N/A | N/A |
/version |
N/A | N/A | N/A |
API Endpoints Summary
- GET: Returns the client page (Mange-Eater-Client-Page). No payload required. Returns
text/html
. - POST: Starts the scraper. Requires a
JSON
payload (RequestBody
). Returns aPromise<string>
.
- GET: Provides information about the Discord channel. No payload required. Returns
JSON
(ChannelInfo
). - POST: Changes the current channel. Requires a payload
{index:number}
. Returns aPromise<string>
. - POST (
/channel/add
): Adds a Discord channel. Requires a payload{channelID:string}
. Returns aPromise<ChannelInfo>
.
- GET: Provides information about the directory. No payload required. Returns
JSON
(DirectoryOutbound
). - POST: Under development. Requires a payload
{checked:Checked[]}
. Returns aPromise<string>
. - DELETE: Deletes selected directories. Requires a payload
{checked:Checked[]}
. Returns aPromise<string>
.
- POST: Starts the scraper. Requires a payload
{url:string, ifPush:boolean}
. Returns aPromise<string>
.
- GET: Returns a test string. No payload required.
- POST: Payload required (
JSON
:BC_GeneralPayload
). Returns aPromise<string>
.
- GET: Returns the version as a string (
/version
) or information about the version (/version/info
) inJSON
(VersionInfo
). No payload required.
Types
interface RequestBody {
title: string;
urls?: string[];
url?: string;
ifPush?: boolean;
}
interface ChannelInfo {
currentName: string;
alt?: string[];
}
interface DirectoryOutbound {
titles: string[];
outbound: Archive[];
}
interface Checked {
index: number;
checked: number[];
}
interface VersionInfo {
version: string;
build_id: string;
build_message: string;
number_of_jobs: number;
}
interface BC_GeneralPayload {
type: string;
eventInfo: {
guild_id: string;
channel_id: string;
token: string;
app_id: string;
};
data: any;
}
- スクレイピングの高速化
- Discordbot としてデーモン化
- ページを指定して、自動で更新を検知し、その分自動でスクレイピング&Disocrd にプッシュ
- Jobs に関して、Push、Fetch のカテゴリ検知機能をつける(ID で管理する予定。)