Naked Panda Meditations

    @5app/digital-hub-api
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.4 • Public • Published

    Digital Hub NodeJS API

    Greenkeeper badge Known Vulnerabilities Coverage Status CircleCI

    A NodeJS API for interoperating with a Digital Hub

    Samples

    The samples folder highlights how the API can be used to automate and report operations with a Digital Hub.

    Core API

    Create an instance of the hub

    const Hub = require('@5app/digital-hub-api');

    constructor

    The constructor defines the environment and user credentials

    const hub = new Hub({
    	tenant, 
    	username,
    	password
    })

    api

    This makes a request using node-fetch.

    await hub.api({
    	path: 'api/assets',
    	qs: {
    		fields: ['id', 'name'],
    		filters: {
    			parent_id: 13123
    		}
    	}
    })

    Note: Docs on the available HTTP endpoints, methods and parameters are in development.

    Keywords

    none

    Install

    npm i @5app/digital-hub-api

    DownloadsWeekly Downloads

    35

    Version

    1.0.4

    License

    ISC

    Unpacked Size

    5.65 kB

    Total Files

    4

    Last publish

    Collaborators

    • adodson
    • diondiondion
    • ikhemissi
    • charles5app
    • 5app-bot