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://xeats.io/v1.0',
    el: '#seat-map',
    accessKey: 'ff5c1d60-ef8d-4284-82c1-35e8be350e34',
    secret: '61b4311e47a8dfce2c0819e95100e95f',
    /**
     * 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
  })
})()