xeats-sdk(creating seats)

A demo to use xeats-sdk for creating seats.

by Andy You

HTML

<script src="https://unpkg.com/xeats-sdk"></script>
<div class="rwd-container">
  <div id="seat-map"></div>
</div>

JavaScript

// This is a demo to use xeats-sdk for creating seats.
// For more information, check on npm: https://www.npmjs.com/package/xeats-sdk

(function() {
  var xeat = new Xeats.ManagerMap({
    endPoint: 'https://ebd59104.ngrok.io/v1.0',
    el: '#seat-map',
    accessKey: 'a54dd66c-4298-4e4e-a8d7-055332e2606c',
    secret: '5d60a6c0625527d5d9be4445e587e5fd',
    /**
     * The unique key for create a seats.
     * You can name it as hash or event name.
     * NOTE: it decide which seats you use.
     *  Each time you make a new name will create another seats.
     */
    seatsKey: 'sandbox',
    // categories: ['A', 'B', 'C', 'D'],
    categories: [{
      name: 'Free',
      info: {
        ticketId: 'free',
        price: '0'
      },
      comment: "This is for students",
      sn: "0"
    }, {
      name: 'Early Bird',
      info: {
        ticketId: 'earlyBird',
        price: '545'
      },
      comment: 'This is for early birds',
      sn: "1"
    }, {
      name: 'Normal',
      info: {
        ticketId: 'normal',
        price: '390'
      },
      comment: "This is normal price ticket",
      sn: "2"
    }],
    disableWheel: false,
    // zoomMax: 4,    // default is 2
    // zoomMin: 0.5,  // default is 0.5
    width: 'auto', // For responsive set value to `auto`
    height: 800, // Height can not set to auto
  })
})()