This commit is contained in:
Jacob Nguyen
2023-12-13 14:14:18 -06:00
parent 28d6c4cb00
commit 1c48ac763b
2 changed files with 28 additions and 1 deletions

24
packages/poster/README.md Normal file
View 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());
```

View File

@@ -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 // ??