Attributes
Includes Deno configuration
Repository
Current version released
3 years ago
Dependencies
deno.land/x
gist.github.com
Versions
- v1.0.0-RCLatest
- v1.0.0-pre-release-11
- v1.0.0-pre-release-10
- v1.0.0-pre-release-9
- v1.0.0-doc-test-1
- v1.0.0-pre-release-8
- 1.0.0-pre-release-7
- v1.0.0-pre-release-6
- v1.0.0-pre-release-5
- v1.0.0-pre-release-4
- v1.0.0-pre-release-3
- v1.0.0-pre-release-2
- v1.0.0-pre-release
- v0.1.1
- v0.1.0
- v0.0.1-alpha.14
- v0.0.1-alpha.13
- v0.0.1-alpha.12
- v0.0.1-alpha.11
- v0.0.1-alpha.9
- v0.0.1-alpha.8
- v0.0.1-alpha.7
- v0.0.1-alpha.6
- v0.0.1-alpha.5
- v0.0.1-alpha.4
- v0.0.1-alpha.4
- v0.0.1-alpha.3
- v0.0.1-alpha.2
tpy
A strongly typed Pylon API client. https://pylon.bot/
import Tpy from 'https://deno.land/x/tpy@0.0.1/mod.ts';
// Or use Node
// import Tpy from 'tpy';
const client = new Tpy('My.pYl0N_tOKEn');
const [err, user] = await client.getUser();
// Tpy has strongly typed error handling so there are no need for type guards.
// If there's an error, the response will return undefined,
// Otherwise, the response will the requested type as expected.
if (err) {
throw `There was an error while fetching the user: ${TpyErrToString(err)}.`;
// user is now !undefined.
} else console.log(`User logged in: ${user.displayName}`);
// README integrity: passing
Contributing
Currently, the library is in early development with a list of TODOs. If youβd like to contribute please read the contributing guide.