1.0.24 • Published 8 months ago

@blues-inc/notehub-js v1.0.24

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@blues-inc/notehub-js

NotehubJs - JavaScript client for @blues-inc/notehub-js The OpenAPI definition for the Notehub.io API.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.2.0
  • Package version: 1.0.24
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://dev.blues.io/support/

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install @blues-inc/notehub-js --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your @blues-inc/notehub-js from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false,
      },
    },
  ];
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var NotehubJs = require('@blues-inc/notehub-js');

var defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"

var api = new NotehubJs.AlertApi()
var projectUID = app:2606f411-dea6-44a0-9743-1130f57d77d8; // {String}
var opts = {
  'pageSize': 50, // {Number}
  'pageNum': 1, // {Number}
  'monitorUID': "monitorUID_example" // {String}
};
api.getAlerts(projectUID, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://api.notefile.net

ClassMethodHTTP requestDescription
NotehubJs.AlertApigetAlertsGET /v1/projects/{projectUID}/alerts
NotehubJs.AuthorizationApiloginPOST /auth/login
NotehubJs.BillingAccountApigetBillingAccountsGET /v1/billing-accounts
NotehubJs.DeviceApideleteDeviceEnvironmentVariableDELETE /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables/{key}
NotehubJs.DeviceApideleteProjectDeviceDELETE /v1/projects/{projectUID}/devices/{deviceUID}
NotehubJs.DeviceApidisableDevicePOST /v1/projects/{projectUID}/devices/{deviceUID}/disable
NotehubJs.DeviceApidisableDeviceConnectivityAssurancePOST /v1/projects/{projectUID}/devices/{deviceUID}/disable-connectivity-assurance
NotehubJs.DeviceApienableDevicePOST /v1/projects/{projectUID}/devices/{deviceUID}/enable
NotehubJs.DeviceApienableDeviceConnectivityAssurancePOST /v1/projects/{projectUID}/devices/{deviceUID}/enable-connectivity-assurance
NotehubJs.DeviceApigetDeviceGET /v1/projects/{projectUID}/devices/{deviceUID}
NotehubJs.DeviceApigetDeviceEnvironmentVariablesGET /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables
NotehubJs.DeviceApigetDeviceEnvironmentVariablesByPinGET /v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin
NotehubJs.DeviceApigetDeviceHealthLogGET /v1/projects/{projectUID}/devices/{deviceUID}/health-log
NotehubJs.DeviceApigetDeviceLatestGET /v1/projects/{projectUID}/devices/{deviceUID}/latest
NotehubJs.DeviceApigetDevicePublicKeyGET /v1/projects/{projectUID}/devices/{deviceUID}/public-key
NotehubJs.DeviceApigetDeviceSessionsGET /v1/projects/{projectUID}/devices/{deviceUID}/sessions
NotehubJs.DeviceApigetProjectDevicePublicKeysGET /v1/projects/{projectUID}/devices/public-keys
NotehubJs.DeviceApigetProjectDevicesGET /v1/projects/{projectUID}/devices
NotehubJs.DeviceApigetProjectFleetDevicesGET /v1/projects/{projectUID}/fleets/{fleetUID}/devices
NotehubJs.DeviceApihandleNoteAddPOST /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}
NotehubJs.DeviceApihandleNoteChangesGET /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/changes
NotehubJs.DeviceApihandleNoteCreateAddPOST /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}
NotehubJs.DeviceApihandleNoteDeleteDELETE /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}
NotehubJs.DeviceApihandleNoteGetGET /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}
NotehubJs.DeviceApihandleNoteSignalPOST /v1/projects/{projectUID}/devices/{deviceUID}/signal
NotehubJs.DeviceApihandleNoteUpdatePUT /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}
NotehubJs.DeviceApihandleNotefileChangesGET /v1/projects/{projectUID}/devices/{deviceUID}/files/changes
NotehubJs.DeviceApihandleNotefileChangesPendingGET /v1/projects/{projectUID}/devices/{deviceUID}/files/changes/pending
NotehubJs.DeviceApihandleNotefileDeleteDELETE /v1/projects/{projectUID}/devices/{deviceUID}/files
NotehubJs.DeviceApipostProvisionProjectDevicePOST /v1/projects/{projectUID}/devices/{deviceUID}/provision
NotehubJs.DeviceApiputDeviceEnvironmentVariablesPUT /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables
NotehubJs.DeviceApiputDeviceEnvironmentVariablesByPinPUT /v1/products/{productUID}/devices/{deviceUID}/environment_variables_with_pin
NotehubJs.EventApigetFleetEventsGET /v1/projects/{projectUID}/fleets/{fleetUID}/events
NotehubJs.EventApigetFleetEventsByCursorGET /v1/projects/{projectUID}/fleets/{fleetUID}/events-cursor
NotehubJs.EventApigetProjectEventsGET /v1/projects/{projectUID}/events
NotehubJs.EventApigetProjectEventsByCursorGET /v1/projects/{projectUID}/events-cursor
NotehubJs.EventApigetRouteLogsByEventGET /v1/projects/{projectUID}/events/{eventUID}/route-logs
NotehubJs.MonitorApicreateMonitorPOST /v1/projects/{projectUID}/monitors
NotehubJs.MonitorApideleteMonitorDELETE /v1/projects/{projectUID}/monitors/{monitorUID}
NotehubJs.MonitorApigetMonitorGET /v1/projects/{projectUID}/monitors/{monitorUID}
NotehubJs.MonitorApigetMonitorsGET /v1/projects/{projectUID}/monitors
NotehubJs.MonitorApiupdateMonitorPUT /v1/projects/{projectUID}/monitors/{monitorUID}
NotehubJs.ProjectApicloneProjectPOST /v1/projects/{projectUID}/clone
NotehubJs.ProjectApicreateFleetPOST /v1/projects/{projectUID}/fleets
NotehubJs.ProjectApicreateProductPOST /v1/projects/{projectUID}/products
NotehubJs.ProjectApicreateProjectPOST /v1/projects
NotehubJs.ProjectApideleteDeviceFleetsDELETE /v1/projects/{projectUID}/devices/{deviceUID}/fleets
NotehubJs.ProjectApideleteFleetDELETE /v1/projects/{projectUID}/fleets/{fleetUID}
NotehubJs.ProjectApideleteFleetEnvironmentVariableDELETE /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables/{key}
NotehubJs.ProjectApideleteProjectDELETE /v1/projects/{projectUID}
NotehubJs.ProjectApideleteProjectEnvironmentVariableDELETE /v1/projects/{projectUID}/environment_variables/{key}
NotehubJs.ProjectApidfuActionPOST /v1/projects/{projectUID}/dfu/{firmwareType}/{action}
NotehubJs.ProjectApidisableGlobalTransformationPOST /v1/projects/{projectUID}/global-transformation/disable
NotehubJs.ProjectApienableGlobalTransformationPOST /v1/projects/{projectUID}/global-transformation/enable
NotehubJs.ProjectApigetDeviceDfuHistoryGET /v1/projects/{projectUID}/devices/{deviceUID}/dfu/{firmwareType}/history
NotehubJs.ProjectApigetDeviceDfuStatusGET /v1/projects/{projectUID}/devices/{deviceUID}/dfu/{firmwareType}/status
NotehubJs.ProjectApigetDeviceFleetsGET /v1/projects/{projectUID}/devices/{deviceUID}/fleets
NotehubJs.ProjectApigetDevicesDfuHistoryGET /v1/projects/{projectUID}/dfu/{firmwareType}/history
NotehubJs.ProjectApigetDevicesDfuStatusGET /v1/projects/{projectUID}/dfu/{firmwareType}/status
NotehubJs.ProjectApigetFirmwareInfoGET /v1/projects/{projectUID}/firmware
NotehubJs.ProjectApigetFleetEnvironmentVariablesGET /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables
NotehubJs.ProjectApigetProjectGET /v1/projects/{projectUID}
NotehubJs.ProjectApigetProjectByProductGET /v1/products/{productUID}/project
NotehubJs.ProjectApigetProjectEnvironmentVariablesGET /v1/projects/{projectUID}/environment_variables
NotehubJs.ProjectApigetProjectFleetsGET /v1/projects/{projectUID}/fleets
NotehubJs.ProjectApigetProjectMembersGET /v1/projects/{projectUID}/members
NotehubJs.ProjectApigetProjectProductsGET /v1/projects/{projectUID}/products
NotehubJs.ProjectApigetProjectsGET /v1/projects
NotehubJs.ProjectApiputDeviceFleetsPUT /v1/projects/{projectUID}/devices/{deviceUID}/fleets
NotehubJs.ProjectApiputFleetEnvironmentVariablesPUT /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables
NotehubJs.ProjectApiputProjectEnvironmentVariablesPUT /v1/projects/{projectUID}/environment_variables
NotehubJs.ProjectApisetGlobalTransformationPOST /v1/projects/{projectUID}/global-transformation
NotehubJs.ProjectApiupdateFleetPUT /v1/projects/{projectUID}/fleets/{fleetUID}
NotehubJs.RouteApicreateRoutePOST /v1/projects/{projectUID}/routes
NotehubJs.RouteApideleteRouteDELETE /v1/projects/{projectUID}/routes/{routeUID}
NotehubJs.RouteApigetRouteGET /v1/projects/{projectUID}/routes/{routeUID}
NotehubJs.RouteApigetRouteLogsByRouteGET /v1/projects/{projectUID}/routes/{routeUID}/route-logs
NotehubJs.RouteApigetRoutesGET /v1/projects/{projectUID}/routes
NotehubJs.RouteApiupdateRoutePUT /v1/projects/{projectUID}/routes/{routeUID}

Documentation for Models

Documentation for Authorization

api_key

  • Type: API key
  • API key parameter name: X-Session-Token
  • Location: HTTP header

pin

  • Type: API key
  • API key parameter name: X-Auth-Token
  • Location: HTTP header
1.0.24

8 months ago

1.0.23-beta.34

8 months ago

1.0.23-beta.33

8 months ago

1.0.23-beta.32

8 months ago

1.0.23-beta.31

8 months ago

1.0.23-beta.30

9 months ago

1.0.23-beta.29

9 months ago

1.0.23-beta.28

9 months ago

1.0.23-beta.27

9 months ago

1.0.23-beta.26

9 months ago

1.0.23-beta.25

9 months ago

1.0.23-beta.24

9 months ago

1.0.23-beta.23

9 months ago

1.0.23-beta.22

9 months ago

1.0.23-beta.21

9 months ago

1.0.23-beta.20

9 months ago

1.0.23-beta.19

9 months ago

1.0.23-beta.18

9 months ago

1.0.23-beta.17

9 months ago

1.0.23-beta.16

9 months ago

1.0.23-beta.15

9 months ago

1.0.23-beta.14

9 months ago

1.0.23-beta.13

9 months ago

1.0.23-beta.12

9 months ago

1.0.23-beta.11

9 months ago

1.0.23-beta.10

9 months ago

1.0.23-beta.6

9 months ago

1.0.23-beta.5

9 months ago

1.0.23-beta.8

9 months ago

1.0.23-beta.7

9 months ago

1.0.23-beta.9

9 months ago

1.0.23-beta.2

9 months ago

1.0.23-beta.1

9 months ago

1.0.23-beta.4

9 months ago

1.0.23-beta.3

9 months ago

1.0.22

11 months ago

1.0.23

10 months ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago