0.2.29 • Published 4 years ago

libfhqcli-web-js v0.2.29

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

libfhqcli-web-js

JavaScript Client Library for fhq-server: https://github.com/freehackquest/fhq-server.git

Install

npm install --save libfhqcli-web-js

Example code

Include script dist/libfhqcli-web-js.js

fhq.bind('notify', function(data){
    console.log('notify: ' + JSON.stringify(data))
});

fhq.bind('connected', function(data) {
    console.log('connected: ' + JSON.stringify(data))
});

fhq.bind('disconnected', function(data) {
    console.log('disconnected: ' + JSON.stringify(data))
});

fhq.bind('userdata', function(data) {
    console.log('userdata: ' + JSON.stringify(data))
});

// connect
fhq.init({
    'baseUrl': ws://' + window.location.hostname + ':1234/api-ws/
});

// for disconnect call fhq.deinit()

After success connection you can call API.md

0.2.29

4 years ago

0.2.27

4 years ago

0.2.26

4 years ago

0.2.25

4 years ago

0.2.24

4 years ago

0.2.22

5 years ago

0.2.18

5 years ago

0.0.1

5 years ago