First you need to import the packages needed. There are 2 packages: dash and dashAuth. dashAuth. DashAuth is build upon xboxlive-auth and all credit for authenticating goes to them.
Since dash is built using javascript, this quick start will also use javascript.
In this demo we have replaced the email and password of your microsoft account with their respective names, your real email and password should not be shared with anyone and should look along the lines of
something@something.something
Using a microsoft code to authenticate
./profiles is a folder for account cache. To see more about how this is used go here
Realm
To use the realm methods you can initialise a realm class with a realm id or realm invite code.
Or by using an invite code:
Note that all of these examples are using fake realm information, you will need to use your own informaton.
Client
To use the client methods you can initialise a client class, no paramaters are needed.
For all methods in either the realm or client class, refer to the documentation.
// require the myapi module and set it up with your API key
const myapi = require('myapi')(YOUR_API_KEY);
const newPet = away myapi.pet.create({
name: 'Wilson',
owner_id: 'sha7891bikojbkreuy',
species: 'Dog',
breed: 'Golden Retriever',
})