0.5.7 • Published 3 years 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 installnpm run build builds the library to dist, generating three files:
dist/client.cjs.jsA CommonJS bundle, suitable for use in Node.js, thatrequires the external dependency. This corresponds to the"main"field in package.jsondist/client.esm.jsan ES module bundle, suitable for use in other people's libraries and applications, thatimports the external dependency. This corresponds to the"module"field in package.jsondist/client.umd.jsa 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.