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
61
61
' test file'
62
62
// { secret: true }
63
63
)
64
- .then ((res ) => {
65
- console .log (` Gist created: ${res .data ! .id } ` );
66
- })
64
+ .then ((res ) => console .log (` Gist created: ${res .data ! .id } ` ))
67
65
.catch ((err ) => console .log (err ));
68
66
```
69
67
@@ -86,6 +84,37 @@ await gist
86
84
87
85
<br >
88
86
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
+
89
118
## Delete Gist
90
119
91
120
| Parameter | Type |
You can’t perform that action at this time.
0 commit comments