Skip to content

Commit ff5e449

Browse files
committed
Update index.ts
1 parent 6beef45 commit ff5e449

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/index.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { GistFile, GistOptions, GistResponse, IGist, ReqRet } from './types';
2-
import { _create, _delete, _get } from './gist';
2+
import { _create, _delete, _get, _update } from './gist';
33

44
export default class Gist implements IGist {
55
public readonly token: string;
@@ -26,4 +26,13 @@ export default class Gist implements IGist {
2626
public get(id: string): Promise<ReqRet<GistResponse>> {
2727
return _get(id, this.token);
2828
}
29+
30+
public update(
31+
id: string,
32+
files: GistFile,
33+
description: string,
34+
options?: GistOptions
35+
): Promise<ReqRet<any>> {
36+
return _update(id, files, description, this.token, options);
37+
}
2938
}

0 commit comments

Comments
 (0)