0.8.6 • Published 5 years ago

draconode v0.8.6

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

npm version downloads Donate Build Status Known Vulnerabilities Greenkeeper badge

DracoNode: a node draco api

API to communicate with Draconius GO server.
Writing in TypeScript, compiled into full JavaScript for Node 8.x.

Include main API calls as well s Google login.

This is still a work in progress, not everything is implemented.
Ask for feature or report bugs here: https://github.com/dracoapi/nodedracoapi/issues

How to use

All api calls can be done manuall using the .call(service, method, args) method.

import * as DracoNode from 'draconode';

const draco = new DracoNode.Client();
const response = await draco.call('AuthService', 'trySingIn', [
    new objects.AuthData({
        authType: enums.AuthType.DEVICE,
        profileId: this.user.deviceId,
    }),
    this.clientInfo,
    new objects.FRegistrationInfo({
        regType: 'dv',
    }),
]);

More high level methods also exists, here is a more complete example that get user items:

import * as DracoNode from 'draconode';

const draco = new DracoNode.Client();
const ping = await draco.ping();
await draco.boot({
    userId,
    deviceId,
});
await draco.login();
await draco.load();
const response = await draco.getUserItems();
for (const item of response.items) {
    console.log(`Item type ${enums.ItemType[item.type]}, count = ${item.count}`);
}

More example can be found here: https://github.com/dracoapi/nodedracoapi/tree/master/src/examples

FAQ

I'm using an old version of node, can I use it?

Not directly but your can get it from GitHub, and change tsconfig.json to compile if for an old version of node (use ES2016 or ES2015).

0.8.6

5 years ago

0.8.5

5 years ago

0.8.4

6 years ago

0.8.3

6 years ago

0.8.2

6 years ago

0.8.1

6 years ago

0.8.0

6 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.6.6

6 years ago

0.6.5

6 years ago

0.6.4

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.3

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.5

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago