0.0.2 • Published 1 year ago
@simo.js/core v0.0.2
Core
@simo.js/core
is a small and fast wrapper over the REST SIMO's API
Installation
The only way to install rest
is via npm
npm i "@simo.js/core"
Using
Getting a user:
import { API, REST } from '@simo.js/core';
const rest = new REST({ auth: AUTH });
const api = new API(rest);
await api.users.get(USER_ID).then(console.log).catch(console.error);
Using only rest:
import { REST, Routes, type RESTGetCurrentUser } from '@simo.js/core';
const rest = new REST({ auth: AUTH });
await rest
.get<RESTGetCurrentUser>(Routes.getCurrentUser)
.then(console.log)
.catch(console.error);
Util Links
Help
If you don't understand something or you are experiencing problems, please join simo Server