README
CloudPlay TypeScript SDK
Usage
import CloudPlay, { UserRequestMessages } from "@cloudplay/sdk";
const cloudplay = new CloudPlay();
cloudplay.initialize({
endpoint: "...",
onInit: async function() {
register();
}
});
async function register() {
try {
const response = await cloudplay.request(UserRequestMessages.REGISTER, {
email: "user@email.com",
password: "12345",
});
console.log("Success:", response);
} catch (e) {
console.error(e.code, e.message);
}
}