MCPcopy Create free account
hub / github.com/Tatamo/atcoder-cli / SessionInterface

Interface SessionInterface

src/session.ts:6–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4type AxiosResponse = import("axios").AxiosResponse;
5
6export interface SessionInterface {
7 /**
8 * このセッションを用いてGETリクエストを発行する。
9 * @param url リクエスト先のURL
10 * @param options
11 */
12 get(url: string, options?: AxiosRequestConfig): Promise<SessionResponseInterface>;
13 /**
14 * このセッションを用いてPOSTリクエストを発行する。
15 * @param url リクエスト先のURL
16 * @param data リクエストボディに含めるデータ。
17 * @param options
18 */
19 post(url: string, data?: any, options?: AxiosRequestConfig): Promise<SessionResponseInterface>;
20 /**
21 * トランザクションを実行する。
22 * コールバック中に保存されたセッションはトランザクションが成功して終了するまで保存されない。
23 */
24 transaction<R>(callback: () => Promise<R>): Promise<R>
25 /**
26 * 現在のセッション情報を破棄します
27 */
28 removeSession(): Promise<void>;
29}
30
31export interface SessionResponseInterface {
32 /**

Callers 9

getMethod · 0.65
postMethod · 0.65
loginMethod · 0.65
postMethod · 0.65
session.tsFile · 0.65
loginMethod · 0.65
session.tsFile · 0.65
logoutMethod · 0.65
session.tsFile · 0.65

Implementers 2

Sessionsrc/session.ts
TestSessiontests/utils/session.ts

Calls

no outgoing calls

Tested by

no test coverage detected