0.8.6 • Published 6 years ago

draconode v0.8.6

Weekly downloads
4
License
MIT
Repository
github
Last release
6 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

6 years ago

0.8.5

6 years ago

0.8.4

7 years ago

0.8.3

7 years ago

0.8.2

7 years ago

0.8.1

7 years ago

0.8.0

7 years ago

0.7.1

7 years ago

0.7.0

7 years ago

0.6.6

7 years ago

0.6.5

7 years ago

0.6.4

7 years ago

0.6.3

7 years ago

0.6.2

7 years ago

0.6.1

7 years ago

0.6.0

7 years ago

0.5.3

7 years ago

0.5.1

7 years ago

0.5.0

7 years ago

0.4.5

7 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago