0.5.7 • Published 1 year ago
@teamtito/checkout-client v0.5.7
Tito Checkout API JavaScript Client
Usage:
Import as an ES module
import Tito from "@teamtito/checkout-client/dist/client.esm"
## Get an Event
const event = await Tito.TitoEvent.get("ultimateconf/2013");
Create a Registration
const registration = await Tito.Registration.create({event: "ultimateconf/2013", line_items: {...}})
Update Registration
const updated = await registration.update({
name: "Indiana Jones",
email: "ijones@barnett.edu"
});
Update a Ticket
const updated = await ticket.update({
first_name: "Henry",
last_name: "Jones",
email: "hjones@cairo.ac.uk"
});
Getting started
Clone this repository and install its dependencies:
git clone https://github.com/rollup/rollup-starter-lib
cd rollup-starter-lib
npm install
npm run build
builds the library to dist
, generating three files:
dist/client.cjs.js
A CommonJS bundle, suitable for use in Node.js, thatrequire
s the external dependency. This corresponds to the"main"
field in package.jsondist/client.esm.js
an ES module bundle, suitable for use in other people's libraries and applications, thatimport
s the external dependency. This corresponds to the"module"
field in package.jsondist/client.umd.js
a UMD build, suitable for use in any environment (including the browser, as a<script>
tag), that includes the external dependency. This corresponds to the"browser"
field in package.json
npm run dev
builds the library, then keeps rebuilding it whenever the source files change using rollup-watch.
npm test
builds the library, then tests it.
License
MIT.