backpulse-wrapper

1.0.3 • Public • Published

npm version

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-wrapper
const Backpulse = require('backpulse-wrapper');
const client = new Backpulse('yoursitename');

Browser

Backpulse API Wrapper is usable with module bundlers such as Browserify.

yarn add backpulse-wrapper
import 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

  • fetchSiteInformations Site informations
  • fetchAbout About content
  • fetchContact Contact content
  • fetchGalleries Array of gallery
  • fetchGallery(id) Specific gallery
  • fetchDefaultGallery Default gallery
  • fetchProjects Array of project
  • fetchProject(id) Specific project
  • fetchArticles Array of articles
  • fetchArticle(id) Specific article
  • fetchVideoGroups Array of video groups
  • fetchVideoGroup(id) Specific video group
  • fetchVideo(id) Specific video

Readme

Keywords

Package Sidebar

Install

npm i backpulse-wrapper

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

5.71 kB

Total Files

11

Last publish

Collaborators

  • backpulse