1.0.3 • Published 2 years ago

notehub-js v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

notehub-js

NotehubJs - JavaScript client for 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.3
  • 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 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 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('notehub-js');


var api = new NotehubJs.AuthorizationApi()
var loginRequest = new NotehubJs.LoginRequest(); // {LoginRequest} 
api.login(loginRequest).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

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

ClassMethodHTTP requestDescription
NotehubJs.AuthorizationApiloginPOST /auth/login
NotehubJs.BillingAccountApigetBillingAccountsGET /v1/billing-accounts
NotehubJs.DeviceApideleteDeviceEnvironmentVariableDELETE /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables/{key}
NotehubJs.DeviceApideleteDeviceFleetsDELETE /v1/projects/{projectUID}/devices/{deviceUID}/fleets
NotehubJs.DeviceApidisableDevicePOST /v1/projects/{projectUID}/devices/{deviceUID}/disable
NotehubJs.DeviceApienableDevicePOST /v1/projects/{projectUID}/devices/{deviceUID}/enable
NotehubJs.DeviceApigetDeviceEnvironmentVariablesGET /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables
NotehubJs.DeviceApigetDeviceEnvironmentVariablesByPinGET /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables_with_pin
NotehubJs.DeviceApigetDeviceFleetsGET /v1/projects/{projectUID}/devices/{deviceUID}/fleets
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.DeviceApihandleNoteSignalPOST /v1/projects/{projectUID}/devices/{deviceUID}/signal
NotehubJs.DeviceApiputDeviceEnvironmentVariablesPUT /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables
NotehubJs.DeviceApiputDeviceEnvironmentVariablesByPinPUT /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables_with_pin
NotehubJs.DeviceApiputDeviceFleetsPUT /v1/projects/{projectUID}/devices/{deviceUID}/fleets
NotehubJs.DevicesApideleteProjectDeviceDELETE /v1/projects/{projectUID}/devices/{deviceUID}
NotehubJs.DevicesApigetDeviceGET /v1/projects/{projectUID}/devices/{deviceUID}
NotehubJs.DevicesApigetProjectDevicePublicKeysGET /v1/projects/{projectUID}/devices/public-keys
NotehubJs.DevicesApigetProjectDevicesGET /v1/projects/{projectUID}/devices
NotehubJs.DevicesApigetProjectFleetDevicesGET /v1/projects/{projectUID}/fleets/{fleetUID}/devices
NotehubJs.EnvironmentVariablesApideleteDeviceEnvironmentVariableDELETE /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables/{key}
NotehubJs.EnvironmentVariablesApideleteFleetEnvironmentVariableDELETE /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables/{key}
NotehubJs.EnvironmentVariablesApideleteProjectEnvironmentVariableDELETE /v1/projects/{projectUID}/environment_variables/{key}
NotehubJs.EnvironmentVariablesApigetDeviceEnvironmentVariablesGET /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables
NotehubJs.EnvironmentVariablesApigetDeviceEnvironmentVariablesByPinGET /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables_with_pin
NotehubJs.EnvironmentVariablesApigetFleetEnvironmentVariablesGET /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables
NotehubJs.EnvironmentVariablesApigetProjectEnvironmentVariablesGET /v1/projects/{projectUID}/environment_variables
NotehubJs.EnvironmentVariablesApiputDeviceEnvironmentVariablesPUT /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables
NotehubJs.EnvironmentVariablesApiputDeviceEnvironmentVariablesByPinPUT /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables_with_pin
NotehubJs.EnvironmentVariablesApiputFleetEnvironmentVariablesPUT /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables
NotehubJs.EnvironmentVariablesApiputProjectEnvironmentVariablesPUT /v1/projects/{projectUID}/environment_variables
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.FilesApihandleNotefileChangesGET /v1/projects/{projectUID}/devices/{deviceUID}/files/changes
NotehubJs.FilesApihandleNotefileChangesPendingGET /v1/projects/{projectUID}/devices/{deviceUID}/files/changes/pending
NotehubJs.FilesApihandleNotefileDeleteDELETE /v1/projects/{projectUID}/devices/{deviceUID}/files
NotehubJs.FleetApicreateFleetPOST /v1/projects/{projectUID}/fleets
NotehubJs.FleetApideleteDeviceFleetsDELETE /v1/projects/{projectUID}/devices/{deviceUID}/fleets
NotehubJs.FleetApideleteFleetDELETE /v1/projects/{projectUID}/fleets/{fleetUID}
NotehubJs.FleetApideleteFleetEnvironmentVariableDELETE /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables/{key}
NotehubJs.FleetApigetDeviceFleetsGET /v1/projects/{projectUID}/devices/{deviceUID}/fleets
NotehubJs.FleetApigetFleetEnvironmentVariablesGET /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables
NotehubJs.FleetApigetFleetEventsGET /v1/projects/{projectUID}/fleets/{fleetUID}/events
NotehubJs.FleetApigetFleetEventsByCursorGET /v1/projects/{projectUID}/fleets/{fleetUID}/events-cursor
NotehubJs.FleetApigetProjectFleetDevicesGET /v1/projects/{projectUID}/fleets/{fleetUID}/devices
NotehubJs.FleetApigetProjectFleetsGET /v1/projects/{projectUID}/fleets
NotehubJs.FleetApiputDeviceFleetsPUT /v1/projects/{projectUID}/devices/{deviceUID}/fleets
NotehubJs.FleetApiputFleetEnvironmentVariablesPUT /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables
NotehubJs.FleetApiupdateFleetPUT /v1/projects/{projectUID}/fleets/{fleetUID}
NotehubJs.NotesApihandleNoteAddPOST /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}
NotehubJs.NotesApihandleNoteChangesGET /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/changes
NotehubJs.NotesApihandleNoteCreateAddPOST /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}
NotehubJs.NotesApihandleNoteDeleteDELETE /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}
NotehubJs.NotesApihandleNoteGetGET /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}
NotehubJs.NotesApihandleNoteUpdatePUT /v1/projects/{projectUID}/devices/{deviceUID}/notes/{notefileID}/{noteID}
NotehubJs.ProductApicreateProductPOST /v1/projects/{projectUID}/products
NotehubJs.ProductApigetProjectByProductGET /v1/products/{productUID}/project
NotehubJs.ProductApigetProjectProductsGET /v1/projects/{projectUID}/products
NotehubJs.ProjectApicreateProductPOST /v1/projects/{projectUID}/products
NotehubJs.ProjectApicreateProjectPOST /v1/projects
NotehubJs.ProjectApideleteProjectEnvironmentVariableDELETE /v1/projects/{projectUID}/environment_variables/{key}
NotehubJs.ProjectApigetProjectGET /v1/projects/{projectUID}
NotehubJs.ProjectApigetProjectByProductGET /v1/products/{productUID}/project
NotehubJs.ProjectApigetProjectDevicePublicKeysGET /v1/projects/{projectUID}/devices/public-keys
NotehubJs.ProjectApigetProjectDevicesGET /v1/projects/{projectUID}/devices
NotehubJs.ProjectApigetProjectEnvironmentVariablesGET /v1/projects/{projectUID}/environment_variables
NotehubJs.ProjectApigetProjectEventsGET /v1/projects/{projectUID}/events
NotehubJs.ProjectApigetProjectEventsByCursorGET /v1/projects/{projectUID}/events-cursor
NotehubJs.ProjectApigetProjectFleetDevicesGET /v1/projects/{projectUID}/fleets/{fleetUID}/devices
NotehubJs.ProjectApigetProjectMembersGET /v1/projects/{projectUID}/members
NotehubJs.ProjectApigetProjectProductsGET /v1/projects/{projectUID}/products
NotehubJs.ProjectApigetProjectsGET /v1/projects
NotehubJs.ProjectApiputProjectEnvironmentVariablesPUT /v1/projects/{projectUID}/environment_variables
NotehubJs.RouteApicreateRoutePOST /v1/projects/{projectUID}/routes
NotehubJs.RouteApideleteRouteDELETE /v1/projects/{projectUID}/routes/{routeUID}
NotehubJs.RouteApigetRouteGET /v1/projects/{projectUID}/routes/{routeUID}
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.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago