1.0.20 • Published 6 days ago

@blues-inc/notehub-js v1.0.20

Weekly downloads
-
License
MIT
Repository
github
Last release
6 days 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.0.0
  • Package version: 1.0.20
  • 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 api = new NotehubJs.AuthorizationApi();
var loginRequest = { username: "name@example.com", password: "test-password" }; // {LoginRequest}
api.login(loginRequest).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.FirmwareApigetFirmwareInfoGET /v1/projects/{projectUID}/firmware
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.ProjectApidisableGlobalTransformationPOST /v1/projects/{projectUID}/global-transformation/disable
NotehubJs.ProjectApienableGlobalTransformationPOST /v1/projects/{projectUID}/global-transformation/enable
NotehubJs.ProjectApigetDeviceFleetsGET /v1/projects/{projectUID}/devices/{deviceUID}/fleets
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.20

6 days ago

1.0.19

6 months ago

1.0.18

8 months ago

1.0.17

8 months ago

1.0.16

9 months ago

1.0.15

10 months ago

1.0.14

10 months ago

1.0.13

10 months ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago