1.1.2 • Published 3 years ago

dogshome v1.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

DogsHome Node.js SDK

Table of Contents

Overview

Dogshome is a Node.js SDK for DogsHome API.

Installation

The DogsHome API Node.js SDK is available on npm as dogshome:

$ npm install --save dogshome

To use the module in your application, require it from any JavaScript file:

const dogshome = require('dogshome');

Usage

SDK Initialization

Require DogsHome API Node.js SDK

const dogshome = require('dogshome');

Initialize a DogsHome application with your API key:

const app = dogshome.initializeApp({
    token: '<your-token>'
});

or...

const config = {
    token: '<your-token>'
}

const app = dogshome.initializeApp(config);

Simplified initialization:

const app = require('dogshome').initializeApp({
    token: '<your-token>'
});

SDK Methods

Get a list of all publications

app.getAllPublications().then(publications => {
    //Successfully retrieved publications
    //...
}).catch(error => {
    //Error retrieving publications
    //...
});

Get single publication by ID

app.getPublicationByID(publicationID).then(publication => {
    //Successfully retrieved publication
    //...
}).catch(error => {
    //Error retrieving publication
    //...
});
1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.77

3 years ago

1.0.76

3 years ago

1.0.75

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago