hack2k18

1.0.3 • Public • Published
const SocketClient = require('hack2k18');

// either local or deployed, specify host
const client = new SocketClient('ws://hack2k18.azurewebsites.net/');

const profile = {
  name: 'mastaWu',
  location: 'VA'
};

client.connect(profile);

client.on('connected', service => {

  // get results
  service.query();

  // results returned
  service.on('query', results => {

    // select
    service.select('brewery');

    // select confirmation
    service.on('selected', selected => {

      // pay
      service.pay('brewery');

      // pay confirmation
      service.on('paid', receipt => {

        console.log(receipt);
      });
    });
  });
});

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.31latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.31
1.0.21
1.0.10
1.0.01

Package Sidebar

Install

npm i hack2k18

Weekly Downloads

3

Version

1.0.3

License

MIT

Unpacked Size

3.57 kB

Total Files

3

Last publish

Collaborators

  • scniro