File tree Expand file tree Collapse file tree 1 file changed +32
-3
lines changed
Expand file tree Collapse file tree 1 file changed +32
-3
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,7 @@ await gist
6161 ' test file'
6262 // { secret: true }
6363 )
64- .then ((res ) => {
65- console .log (` Gist created: ${res .data ! .id } ` );
66- })
64+ .then ((res ) => console .log (` Gist created: ${res .data ! .id } ` ))
6765 .catch ((err ) => console .log (err ));
6866```
6967
@@ -86,6 +84,37 @@ await gist
8684
8785<br >
8886
87+ ## Update Gist
88+
89+ | Parameter | Type |
90+ | ------------- | ------------- |
91+ | ` id ` | ` number ` |
92+ | ` files ` | ` GistFile ` |
93+ | ` description ` | ` string ` |
94+ | ` options? ` | ` GistOptions ` |
95+
96+ > ** return:** [ ` Promise<ReqRet<{}>> ` ] ( ./src/types.ts )
97+ >
98+ > ** Note:** ` res.data ` is undefined.
99+
100+ ``` ts
101+ await gist
102+ .update (
103+ ' gist id' ,
104+ {
105+ file_name: { content: ' File Content' },
106+ file_name_2: { content: ' File Content 2' },
107+ file_name_3: { content: ' File Content 3' },
108+ },
109+ ' test file - update'
110+ // { secret: true }
111+ )
112+ .then ((res ) => console .log (` Gist updated: ${res .status .code } ` ))
113+ .catch ((err ) => console .log (err ));
114+ ```
115+
116+ <br >
117+
89118## Delete Gist
90119
91120| Parameter | Type |
You can’t perform that action at this time.
0 commit comments