1.0.1 • Published 8 years ago
kite-photobook-sdk v1.0.1
Kite Photobook SDK
The Kite Photobook SDK provides an interface to launch into the Kite Photobook Web Application.
Suggested Installation Approach
via NPM
npm install kite-photobook-sdk
Suggested JavaScript Usage / Approach
The library currently has a single method, launchPhotobook, which launches the photobook app with a number of images automatically included in the users photobook.
KitePhotobook.launchPhotobook({
brand: 'brandName',
images: [{
dimensions: {
height: 5619,
width: 17494,
},
thumbnailUrl: 'https://s3.amazonaws.com/kiteshopify/8aca83a9-9d01-427b-955b-f40487ca90b5_preview.jpeg',
url: 'https://s3.amazonaws.com/kiteshopify/8aca83a9-9d01-427b-955b-f40487ca90b5.jpeg'
}]
});
The brand should be replaced by the name of your brand which will match the url your app launches at. For example, if your branded version of the photobook is at http://photobook.kite/thisbrand then the brand name would be thisbrand, the last part of the url.
Expected images data shape
Array<{
dimensions: {
width: number;
height: number;
};
thumbnailUrl: string;
url: string;
}>
Using Typescript
The library can optionally be launched via TypeScript. The library needs to be imported into your typescript file so assuming the project has been npm installed you can do the following:
import KitePhotobookSdk from 'kite-photobook.sdk/main';
KitePhotobookSdk.startPhotobook({
brand: 'brandName',
images: [{
dimensions: {
height: 5619,
width: 17494,
},
thumbnailUrl: 'https://s3.amazonaws.com/kiteshopify/8aca83a9-9d01-427b-955b-f40487ca90b5_preview.jpeg',
url: 'https://s3.amazonaws.com/kiteshopify/8aca83a9-9d01-427b-955b-f40487ca90b5.jpeg'
}]
});