Skip to content

Commit 35cfb7c

Browse files
committed
Gatewayクラスのコメントをちゃんと書いた
1 parent b379230 commit 35cfb7c

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/client/Gateway.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -108,50 +108,50 @@ export abstract class Gateway {
108108
}
109109

110110
/**
111-
* HTTP GET
112-
* @param url URL to request
113-
* @param params Query strings
114-
* @param options Fetch API options
111+
* HTTP GETのラッパー関数です
112+
* @param url リクエストするURL
113+
* @param params クエリ文字列
114+
* @param options Fetch APIの第二引数になるオブジェクト
115115
*/
116116
protected get <T> (url: string, params = {}, options = {}): Promise<T> {
117117
return this.request(url + (Object.keys(params).length ? '?' + querystring.stringify(params) : ''), { method: 'GET', ...options });
118118
}
119119

120120
/**
121-
* HTTP POST
122-
* @param url URL to request
123-
* @param body Payload
124-
* @param options Fetch API options
121+
* HTTP POSTのラッパー関数です
122+
* @param url リクエストするURL
123+
* @param body リクエストボディ
124+
* @param options Fetch APIの第二引数になるオブジェクト
125125
*/
126126
protected post <T> (url: string, body = {}, options = {}): Promise<T> {
127127
return this.request(url, { method: 'POST', body: JSON.stringify(body), ...options });
128128
}
129129

130130
/**
131-
* HTTP PUT
132-
* @param url URL to request
133-
* @param body Payload
134-
* @param options Fetch API options
131+
* HTTP PUTのラッパー関数です
132+
* @param url リクエストするURL
133+
* @param body リクエストボディ
134+
* @param options Fetch APIの第二引数になるオブジェクト
135135
*/
136136
protected put <T> (url: string, body = {}, options = {}): Promise<T> {
137137
return this.request(url, { method: 'PUT', body: JSON.stringify(body), ...options });
138138
}
139139

140140
/**
141-
* HTTP DELETE
142-
* @param url URL to request
143-
* @param body Payload
144-
* @param options Fetch API options
141+
* HTTP DELETEのラッパー関数です
142+
* @param url リクエストするURL
143+
* @param body リクエストボディ
144+
* @param options Fetch APIの第二引数になるオブジェクト
145145
*/
146146
protected delete <T> (url: string, body = {}, options = {}): Promise<T> {
147147
return this.request(url, { method: 'DELETE', body: JSON.stringify(body), ...options });
148148
}
149149

150150
/**
151-
* HTTP PATCH
152-
* @param url URL to request
153-
* @param body Payload
154-
* @param options Fetch API options
151+
* HTTP PATCHのラッパー関数です
152+
* @param url リクエストするURL
153+
* @param body リクエストボディ
154+
* @param options Fetch APIの第二引数になるオブジェクト
155155
*/
156156
protected patch <T> (url: string, body = {}, options = {}): Promise<T> {
157157
return this.request(url, { method: 'PATCH', body: JSON.stringify(body), ...options });

0 commit comments

Comments
 (0)