0.2.1 • Published 7 years ago

dblsqd-sdk v0.2.1

Weekly downloads
-
License
Apache-2.0
Repository
bitbucket
Last release
7 years ago

dblsqd Node.js SDK

This module provides a simple Promise-based API for retrieving and parsing DBLSQD Feeds.

Which DBLSQD module should I use?

This module is useful for adding update notifications and/or auto-updates to any Node.js application.

If you are using Electron, you can also use the drop-in auto-update UI built on top of this module, dblsqd-electron.

If you need access to the full API of DBLSQD (e. g. for integrating DBLSQD into deployment tools), check out the dblsqd-api module.

Installing

You can install dblsqd-sdk via npm. Add dblsqd-sdk to your package.json or install it via the command-line: npm i --save dblsqd-sdk

Usage

Use dblsqd-sdk in your application like this:

const {Feed} = require("dblsqd-sdk")

let feed = new Feed("https://feeds.dblsqd.com/:app_token", ":channel", ":os", ":arch")
feed.load().then(() => {
    //Get all available releases
    const releases = feed.getReleases()

    //Only get updates to the current version
    const {version} = require("./package.json")
    const updates = feed.getUpdates(version)

    //Download an update
    if (updates.length > 0) {
        feed.downloadRelease(updates[0].version).then(file => {
            console.log(`The update was successfully downloaded to ${file}`)
        })
    }
})
0.2.1

7 years ago

0.2.0

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago