npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kite-tech/photobook-sdk

v3.0.3

Published

Prodigi photobook maker SDK

Downloads

70

Readme

Prodigi Photobook Maker SDK

Prodigi offers white label print on demand portals so that you can sell to your users under your brand.

This SDK is compatible with the Prodigi Photobook Maker. Get your own branded instance at Prodigi Apps Dashboard.

With the Photobook Maker SDK, you can integrate your Photobook maker app into your own website, launching it with pre-configured data, such as images, at run-time.

Table of Contents

Demo and examples

For a list of common use-cases and a demo sandbox, visit: https://sdk.prodigi.com/photobook-maker

Installation

Install using NPM:

npm install @kite-tech/photobook-sdk

Usage

Import the package:

import { KitePhotobook } from '@kite-tech/photobook-sdk';

Launch your Photobook Maker app using the launchPhotobook function and pass in your desired configuration:

const photobookMakerConfig = {
    baseUrl: 'https://photobook.prodigi.com/prodigi',
    images: []
};

KitePhotobook.launchPhotobook(photobookMakerConfig);

API

| Property | Type | Required | Description | |--------------------|-------------------------------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------| | baseUrl | string | YES | The complete URL of your Photobook Maker | | addNewImagesToBook | boolean | NO | If true, any images passed in are automatically added to the Photobook. Default is false | | bookSpineText | string | NO | Optional text to print on the spine of the Photobook | | clearBook | boolean | NO | Clear the Photobook and image library on launch. Default is false | | config | { startInNewTab: boolean} | NO | If true, the app opens in a new tab/window. Default is false | | checkoutFields | CheckoutFieldsObject | NO | Populate the user's details on the checkout | | images | ImagesArray | YES | Pass in images to use in the Photobook | | variantTemplateId | string | NO | Launch into a specific Photobook variant. Template IDs can be found inside the Prodigi apps dashboard. |

CheckoutFieldsObject

| Property | Type | Required | Description | |-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|------------------------------------------------------------------------| | shippingAddress | { recipient_first_name: string, recipient_last_name: string, address_line_1: string, address_line_2: string, city: string, county_state: string, postcode: string, country: string, } | NO | Populates the user's shipping address at the checkout. All values are optional | | customerEmail | string | NO | Sets the user's email address when they reach the checkout | | termsOfService | boolean | NO | Sets whether to automatically agree to terms of service on checkout |

ImagesArray

An array of objects having the following properties:

| Property | Type | Required | Description | |--------------|-----------------------------------------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | dimensions | { width: number, height: number} | NO | The dimensions of the image URL specified. If not set, the dimensions for all images are calculated before launch. If you cannot specify image dimensions and have a large number of images, it is recommended to display a loading spinner until the app is launched. | | thumbnailUrl | string | YES | Lower resolution image URL, used for rendering previews in the browser | | url | string | YES | Full resolution image URL, used for printing |