1.0.3 • Published 7 years ago
backpulse-wrapper v1.0.3
Backpulse API Wrapper
A JavaScript wrapper for the Backpulse API.
Features
- Access every Backpulse API endpoint
- Asynchronous requests
- Simple to use
Usage
Node
yarn add backpulse-wrapperconst Backpulse = require('backpulse-wrapper');
const client = new Backpulse('yoursitename');Browser
Backpulse API Wrapper is usable with module bundlers such as Browserify.
yarn add backpulse-wrapperimport Backpulse from 'backpulse-wrapper';
const client = new Backpulse('yoursitename');Example
// Fetch about content
client.fetchAbout((about, err) => {
console.log(about);
if(err) throw err;
});
// Fetch a specific gallery
client.fetchGallery("1a2b3c", (gallery, err) => {
console.log(gallery);
if(err) throw err;
});Methods
fetchSiteInformationsSite informationsfetchAboutAbout contentfetchContactContact contentfetchGalleriesArray of galleryfetchGallery(id)Specific galleryfetchDefaultGalleryDefault galleryfetchProjectsArray of projectfetchProject(id)Specific projectfetchArticlesArray of articlesfetchArticle(id)Specific articlefetchVideoGroupsArray of video groupsfetchVideoGroup(id)Specific video groupfetchVideo(id)Specific video