@@ -35,6 +25,8 @@ import { gammaResourceViewListLoad } from "gamma-in-js";
})();
```
(Note that, depending on the version of Node which is used to run it, this example may require transpilation by Babel or similar, as it uses the ES6 module syntax.)
### Example input format
All methods accept an object of parameters, e.g. for the call above,
...
...
@@ -287,19 +279,53 @@ Note the use of array fields with a key of `anyType` to produce the correspondin
No input validation is performed because the documentation and calls are just not consistent enough - for example, some calls will return 'Unsupported' if a tag (marked Optional in the docs) is not included as an empty tag; other calls will return a value just fine if the tag is omitted entirely.
If the Gamma API throws an error, an error will also be thrown from the JavaScript method, giving the details.
If the Gamma API throws an error, an error will also be thrown from the JavaScript method, giving any details received.
## TODO
***Endpoints** - a small refactor of `config.js` will be required when the multi-endpoint API architecture is introduced. It is already partly set up to handle this.
***Endpoints** - a small refactor of `config.js` will be required when the multi-endpoint API architecture is introduced. The file is already partly set up to handle this.
## Methods List
See the full Gamma documentation in the `docs/` directory for complete details of each call and its expected input parameters.
### Bookings methods
All of these methods are destructive - i.e. if called correctly they push new data into Gamma or remove existing data from Gamma. They therefore require correspondingly more care in their use.
*`gammaAmendBooking`
*`gammaBookingAllSave`
*`gammaCancelBookingRequest`
*`gammaRemoveContactInterests`
*`gammaSaveCustomerDetails`
*`gammaUpdateBooking`
*`gammaUpdateBookingStatus`
### Reservation methods
These methods are not destructive but do cause some side-effects. They have a separate endpoint as they can be called live/in real time by the website.
*`gammaBookAvailableSpacesRequest`
*`gammaCancelBookAvailableSpaces`
*`gammaReserveXTSeats`
*`gammaCancelSeats`
### Membership methods
These are methods which relate purely to memberships. There are some which are destructive:
*`gammaChangeMemberDetails`
*`gammaMembershipPurchase`
*`gammaMembershipCancellation`
and some which are not:
*`gammaMembershipSubscriptionsLoad`
*`gammaModifiedMembers`
### Availability methods
All of these methods are non-destructive, i.e. they do not push any data into Gamma.
All of these methods are non-destructive, i.e. they do not push any data into Gamma, only pull data from it.
*`gammaAllContactInterests`
*`gammaBookingETicketExportRequest`
...
...
@@ -326,41 +352,11 @@ All of these methods are non-destructive, i.e. they do not push any data into Ga
#### Methods from the docs that are unavailable in this library
The following availability methods seem to be unsupported by the Gamma API. They are not made available on the export:
The following availability methods seem to be unsupported by the Gamma API. They are defined within the library but not made available on the export:
*`ResourceDatesNotAvailable`
*`ResourceListByViewByDateLoadLight`
### Bookings methods
All of these methods **are** destructive - i.e. if called correctly they push new data into Gamma or remove existing data from Gamma. They therefore require correspondingly more care in their use.
*`gammaAmendBooking`
*`gammaBookingAllSave`
*`gammaCancelBookingRequest`
*`gammaRemoveContactInterests`
*`gammaSaveCustomerDetails`
*`gammaUpdateBooking`
*`gammaUpdateBookingStatus`
### Reservation methods
These methods are not destructive but do cause some side-effects. They have a separate endpoint as they can be called live/in real time by the website.
*`gammaBookAvailableSpacesRequest`
*`gammaCancelBookAvailableSpaces`
*`gammaReserveXTSeats`
*`gammaCancelSeats`
### Membership methods
These are methods which relate purely to memberships. There are some which are destructive:
## Contributing
*`gammaChangeMemberDetails`
*`gammaMembershipPurchase`
*`gammaMembershipCancellation`
and some which are not:
*`gammaMembershipSubscriptionsLoad`
*`gammaModifiedMembers`
The distributed version of this library is simply built by Babel, assuming that any applications which use it will be running a relatively modern version of Node.