INSTALL
Type:
Version:
- Static
- Latest Patch
- Latest Minor
- Latest Major
- 0.8.6
- 0.8.5
- 0.8.4
- 0.8.3
- 0.8.2
- 0.8.1
- 0.8.0
- 0.7.16
- 0.7.15
- 0.7.14
- 0.7.13
- 0.7.12
- 0.7.11
- 0.7.10
- 0.7.9
- 0.7.8
- 0.7.7
- 0.7.6
- 0.7.5
- 0.7.4
- 0.7.3
- 0.7.2
- 0.7.1
- 0.7.0
- 0.6.13
- 0.6.12
- 0.6.9
- 0.6.8
- 0.6.7
- 0.6.6
- 0.6.5
- 0.6.4
- 0.6.3
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.21
- 0.5.20
- 0.5.19
- 0.5.18
- 0.5.17
- 0.5.16
- 0.5.15
- 0.5.14
- 0.5.13
- 0.5.12
- 0.5.11
- 0.5.10
- 0.5.9
- 0.5.8
- 0.5.7
- 0.5.5
- 0.5.4
- 0.5.3
- 0.8.5-1
- 0.8.4-rc.7
- 0.8.4-rc.6
- 0.8.4-rc.5
- 0.8.4-rc.4
- 0.8.4-rc.3
- 0.8.4-rc.2
- 0.8.4-rc.1
- 0.7.16-next.2
- 0.7.16-next.1
- 0.6.0-rc.2
- 0.6.0-rc.1
- 0.5.5-5
- 0.5.5-4
- 0.5.5-3
- 0.5.5-2
- 0.5.5-1
- 0.5.3-rc.1-patch.1
- 0.5.3-rc.1-patch.0
- 0.5.3-rc.16
- 0.5.3-rc.15
- 0.5.3-rc.14
- 0.5.3-rc.13
- 0.5.3-rc.12
- 0.5.3-rc.11
- 0.5.3-rc.10
- 0.5.3-rc.9
- 0.5.3-rc.8
- 0.5.3-rc.7
- 0.5.3-rc.6
- 0.5.3-rc.5
- 0.5.3-rc.3
- 0.5.3-rc.2
- 0.5.3-rc.1
- 0.5.3-patch.2
- 0.5.3-patch.1
- 0.5.3-alpha.8-patch.0
- 0.5.3-alpha.0-patch.0
- 0.5.3-alpha.12
- 0.5.3-alpha.11
- 0.5.3-alpha.10
- 0.5.3-alpha.9
- 0.5.3-alpha.8
- 0.5.3-alpha.2
- 0.5.3-alpha.1
- 0.5.3-alpha.0
- 0.5.3-5-patch.4
- 0.5.3-5-patch.3
- 0.5.3-7
- 0.5.3-5
- 0.5.2-alpha.3
- 0.5.2-alpha.2
- 0.5.2-alpha.1
- 0.5.2-alpha.0
- 0.5.1-alpha.10-patch.0
- 0.5.1-alpha.22
- 0.5.1-alpha.10
<script type="module"> import revoltApi from 'https://cdn.jsdelivr.net/npm/revolt-api@0.8.6/+esm' </script>
Revolt API
This package contains typings for objects in the Revolt API and a fully typed API request builder.
Example Usage
If you just need access to types:
import type { User } from 'revolt-api';
If you want to send requests:
import { API } from 'revolt-api';
// Initialise a new API client:
const client = new API();
// or with authentication:
const client = new API({ authentication: { revolt: 'bot-token' } });
// Make requests with ease:
client.get('/users/@me')
// Fully typed responses!
.then(user => user.username);
// No need to worry about the details:
let channel_id = "some channel id";
client.post(`/channels/${channel_id}/messages`, {
// Parameters given are fully typed as well!
content: "some content"
});
For more details on how this works, see the README of @insertish/oapi.