richflyer

1.0.5 • Public • Published

RichFlyer SDK

Overview

This SDK can easily use RichFlyer API.
RichFlyer is messaging service that can send message to push notification, twitter, facebook simultaneously and can attach the rich contents like movie, gif, image.

Installation

npm install richflyer

Prerequisites

  • User should have RichFlyer Account. If you don't have an account, Please contact us from here.
  • RichFlyer API document is here.

Usage

const RichFlyer = require('richflyer');

const rf = new RichFlyer(
    'aaaaa', // Customer Id
    'bbbbb', // Service Id
    'ccccc', // SDK Key
    'ddddd'  // API Key
);

// Upload and Register Media.
rf.registerMedia(
    "https://richflyer.net/movie.mp4", // movieUrl
    "https://richflyer.net/image.jpg") // imageUrl
    .then (async mediaId => {

    // If you will input empty value to title or message, sdk use template title or message.
    await rf.registerPosting(
        true,     // is draft
        false,    // skip approval
        'abcdef', // templateId
        'Goal!',  // title
        'Our team got a goal! Play the movie now!',// message
        mediaId)
        .then( url => {
            // Get editor url. 
            // If you will set draft flag true,, you can open browser with this url and edit message.
            console.log(url);
        }, error => console.log(error.message));

    }, error => console.log(error.message));
}

License

Please read our license.

Readme

Keywords

none

Package Sidebar

Install

npm i richflyer

Weekly Downloads

1

Version

1.0.5

License

SEE LICENSE IN LICENSE

Unpacked Size

30.7 kB

Total Files

5

Last publish

Collaborators

  • richflyer