Simple JS SDK for Publitio API
Switch branches/tags
Nothing to show
Clone or download
Latest commit 6f078b5 May 29, 2018
Permalink
Failed to load latest commit information.
src Update constants.js May 29, 2018
.gitignore Updated .gitignore Jan 16, 2018
.npmignore Initial commit Jan 16, 2018
README.md sc May 15, 2018
examples.js sc May 15, 2018
package-lock.json 1.0.1 May 15, 2018
package.json 1.0.1 May 15, 2018

README.md

Publitio JS SDK


Description

Simple JavaScript SDK for Publitio API.


Installation

Using npm:
$ npm install publitio_js_sdk --save
Using yarn:
$ yarn add publitio_js_sdk

Usage

Using require:
const { publitioApi } = require('publitio_js_sdk')
window.publitioApi = publitioApi
ES6:
import { publitioApi } from 'publitio_js_sdk'
window.publitioApi = publitioApi
// xxxx => Your API_KEY
// yyyy => Your API_SECRET
window.publitio  = publitioApi('xxxx', 'yyyy')

Sample api call to list files:

// list files
publitio.call('/files/list', 'GET', { offset: '0', limit: '10'})
	.then((response) => { console.log(response) })
	.catch((error) => { console.log(error) })

See examples.js file for full list of available classes, methods and options, or check the official docs on www.publit.io.