0.2.29 • Published 5 years ago

libfhqcli-web-js v0.2.29

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

5 years ago

0.2.27

5 years ago

0.2.26

5 years ago

0.2.25

5 years ago

0.2.24

6 years ago

0.2.22

6 years ago

0.2.18

6 years ago

0.0.1

6 years ago