diff --git a/docs/chatterino.d.ts b/docs/chatterino.d.ts index 6edef8f1d44..f07983780bb 100644 --- a/docs/chatterino.d.ts +++ b/docs/chatterino.d.ts @@ -32,8 +32,7 @@ declare module c2 { is_valid(): boolean; } - interface ISharedResource { - } + interface ISharedResource {} class RoomModes { unique_chat: boolean; @@ -72,27 +71,26 @@ declare module c2 { static by_twitch_id(id: string): null | Channel; } - enum HTTPMethod { - Get, - Post, - Put, - Delete, - Patch + Get, + Post, + Put, + Delete, + Patch, } type HTTPResult = { - data: string, - status: number, + data: string; + status: number; - error: string + error: string; }; type HTTPCallback = (res: HTTPResult) => void; class HTTPRequest implements ISharedResource { on_success(callback: HTTPCallback): void; on_error(callback: HTTPCallback): void; - finally(callback: ()=>void): void; + finally(callback: () => void): void; set_timeout(millis: number): void; set_payload(data: string): void; @@ -100,7 +98,6 @@ declare module c2 { execute(): void; - // might error static create(method: HTTPMethod, url: string): HTTPRequest; } diff --git a/docs/wip-plugins.md b/docs/wip-plugins.md index 45a4a9a7ab8..4a8b055c68e 100644 --- a/docs/wip-plugins.md +++ b/docs/wip-plugins.md @@ -90,6 +90,7 @@ Example: Allows the plugin to send HTTP requests. Example: + ```json { ..., @@ -401,6 +402,7 @@ the names may change, do not count on them. It has the following keys: #### `HTTPResult` An `HTTPResult` is a table that contains the following keys: + ```lua { data = "This is the data received from the server as a string",