Skip to content

Commit 7eb82c7

Browse files
committed
Update README.md
1 parent bbda686 commit 7eb82c7

File tree

1 file changed

+2
-40
lines changed

1 file changed

+2
-40
lines changed

README.md

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -107,46 +107,6 @@ await gist
107107

108108
---
109109

110-
<br>
111-
112-
# Example
113-
114-
```ts
115-
import Gist from '@tsukiroku/gist';
116-
117-
const errHandler = (err: any) => console.log(err);
118-
119-
(async () => {
120-
const gist = new Gist('token');
121-
122-
let gist_id: string = '';
123-
124-
await gist
125-
.create(
126-
{ 'hello.ts': { content: 'dd' }, 'hello.rs': { content: 'ddd' } },
127-
'a test file',
128-
{ secret: true }
129-
)
130-
.then((res) => {
131-
gist_id = res.data!.id;
132-
console.log(`Gist created: ${gist_id}`);
133-
})
134-
.catch(errHandler);
135-
136-
await gist
137-
.get(gist_id)
138-
.then((res) =>
139-
console.log(`Gist description: ${res.data!.description}`)
140-
)
141-
.catch(errHandler);
142-
143-
await gist
144-
.delete(gist_id)
145-
.then((res) => console.log(`Gist deleted, status: ${res.status.code}`))
146-
.catch(errHandler);
147-
})();
148-
```
149-
150110
# Status codes
151111

152112
> **ref:** [http_status.ts](./src/structures/http_status.ts)
@@ -173,4 +133,6 @@ const errHandler = (err: any) => console.log(err);
173133

174134
[**LICENSE: MIT**](./LICENSE)
175135

136+
---
137+
176138
> Click [here](https://docs.github.com/en/rest/gists) for more information on the github gists rest API.

0 commit comments

Comments
 (0)