mirror of
https://github.com/sern-handler/tools
synced 2026-06-28 02:32:22 +00:00
readme
This commit is contained in:
24
packages/poster/README.md
Normal file
24
packages/poster/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Poster
|
||||
REST API client for managing discord application commands.
|
||||
|
||||
## features
|
||||
|
||||
- Optionally typed responses
|
||||
- view an example (here)[../poster/test/spec.ts]
|
||||
- Typed options
|
||||
- Simple!
|
||||
- ClojureScript + Typescript
|
||||
- I'm sorry.
|
||||
|
||||
## usage
|
||||
```ts
|
||||
import poster from '@sern/poster';
|
||||
|
||||
const send = poster.client("token", "appid");
|
||||
|
||||
const req = await send("global/get-all", {
|
||||
|
||||
});
|
||||
|
||||
console.log(await req.json());
|
||||
```
|
||||
@@ -12,5 +12,8 @@ if(poster.isOk<GlobalPut>(req)) {
|
||||
req.json().then(s => s?.map(v => v.name))
|
||||
|
||||
}
|
||||
console.log(await req.json());
|
||||
|
||||
const unhandled = await req.json();
|
||||
|
||||
unhandled // ??
|
||||
|
||||
|
||||
Reference in New Issue
Block a user