Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

datahub-nodejs-sdk

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datahub-nodejs-sdk

DataHub Node.js SDK

  • 2.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.6K
increased by23.78%
Maintainers
3
Weekly downloads
 
Created
Source

datahub-nodejs-sdk


NPM version build status Test coverage node version npm download

DataHub Node.js SDK

Contributors


zhangyuheng


xudafeng


zivyangll

This project follows the git-contributor spec, auto updated at Fri Feb 15 2019 23:07:40 GMT+0800.

Installment

$ npm i datahub-nodejs-sdk --save-dev

Common Usage

import DataHubSDK from 'datahub-nodejs-sdk';

const sdkClient = new DataHubSDK();

// switch currentScene for 'POST api/create' to 'sucess'
await sdkClient.switchScene({
  hub: 'app',
  pathname: 'api/create',
  scene: 'success',
  method: 'POST',   // method is optional, default method is 'ALL'
})

// switch currentScene for 'GET api/read' to 'success'
// switch currentScene for 'DELETE api/delete' to 'success'
await sdkClient.switchMultiScenes([{
  hub: 'app',
  pathname: 'api/read',
  scene: 'success',
  method: 'GET',   // method is optional, default method is 'ALL'
}, {
  hub: 'app',
  pathname: 'api/delete',
  scene: 'success',
  method: 'DELETE',  // method is optional, default method is 'ALL'
}])

// switch all scenes for all pathnames under app to 'success'
await sdkClient.switchAllScenes({
  hub: 'app',
  scene: 'success',
})

API Documents

License

The MIT License (MIT)

Keywords

FAQs

Package last updated on 22 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc