Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

react-stickerpipe

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-stickerpipe

React Component for StickerPipe API


Version published
Maintainers
3
Created
Issues
2

React StickerPipe

Component for the StickerPipe API. Currently in development.

Usage

Install from npm

NPM

Basic Usage

import StickerMenu from 'react-stickerpipe';

function sendSticker(sticker) {
  send.sticker(sticker);
}

function MyComponent() {
  return (
    <StickerMenu
      apiKey={your.apiKey}
      userId={your.userId}
      sendSticker={sendSticker}
    />
  );
}

You can also pass your own API client as client to <StickerMenu />. The client must contain the following methods:

// Get the purchased packs for the current user
getMyPacks() {}

// Get the sticker shop
getShop() {}

// Preview a sticker pack
getPackPreview() {}

// Purchase a sticker pack
purchasePack() {}

Installation

src

Install node_modules used in ./src:

$ npm i

Compile ./src with Babel:

$ npm run compile

examples

Install node_modules used in ./examples:

$ cd examples && npm i

Create a settings.json file in ./examples/src:

{
  "apiKey": "yourApiKey",
  "userId": "yourUserId"
}

Development

src

To watch for changes in ./src run:

$ npm run watch

Babel will compile ./src on changes.

examples

To start the webpack server run:

$ cd examples && npm run start

Webpack wil compile on changes in ./examples/src.

Contributing

If you want to help with the development of this module and need to test your changes with the examples you can import <StickerMenu /> directly from ./dist. Be sure to run npm run compile first.

'./examples/src/app.js'

// Change this
import StickerMenu from 'react-stickerpipe';

// to this
import StickerMenu from '../../dist/index';

License

This project is licensed under the terms of the MIT license.

FAQs

Package last updated on 20 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts