appyay

0.0.0-semantically-released • Public • Published

appyay.js

Javascript library for Appyay's Content Delivery API (Node.js and browser).

Installation

This package is distributed via npm:

npm install appyay

Usage

var names = require('appyay.js');
var allNames = names.all;
var randomName = names.random();
var threeRandomNames = names.random(3);

const appyay = require('appyay')

const client = appyay.createClient({
  project: '<project_id>',
  environment: '<environment_id>',//optional
  apiKey: '<api_key>'
})

client.getContentType('<content_type_id>')
.then((contentType) => console.log(contentType))
.catch(console.error)

###REFL

node
var index = require('./src/index.js')
var client = index.createClient({projectId: '<project_id>', environmentId: '<environment_id>', apiKey: '<api_key>'});
//node
//var index = require('./src/index.js')
// var client = index.createClient({projectId: '5b3356e48a43d1d4043a3616', environmentId: '5b3356e48a43d1d4043a3617', apiKey: 'ME7WW3RKHMQWS4ZJHRKCYQ3ZJZGUIUKPFFYWONDJJ4YTM233PN2A'});

//client.getContentType('5b3356e48a43d1d4043a3618').then(function(ct){console.log('--ct--->', ct)})

Project Setup

This project assumes you have NodeJS v6 or greater installed. You should also have npm v3 or greater installed as well (this comes packaged with Node 6). You'll also need a recent version of git installed as well.

/appyay/

    Package Sidebar

    Install

    npm i appyay

    Weekly Downloads

    1

    Version

    0.0.0-semantically-released

    License

    MIT

    Unpacked Size

    34.3 kB

    Total Files

    9

    Last publish

    Collaborators

    • npm