1.1.1-beta2 • Published 4 years ago

@conradconnect/paas-api v1.1.1-beta2

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

@conradconnect/paas-api

ConradConnectPaasApi - JavaScript client for @conradconnect/paas-api This document is strictly private, confidential and personal to its recipients and should not be copied, distributed or reproduced in whole or in part, nor passed to any third party. Defines the initial endpoints of the backend supported by CC that are relevant for the PaaS solution. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.1.1-beta2
  • Package version: 1.1.1-beta2
  • Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen

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 @conradconnect/paas-api --save

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 ConradConnectPaasApi = require('@conradconnect/paas-api');
var defaultClient = ConradConnectPaasApi.ApiClient.instance;


var api = new ConradConnectPaasApi.ActionButtonInteractionApi()
var project = "project_example"; // {String} Project id
var opts = { 
  'body': new ConradConnectPaasApi.ExecuteActionButtonProjectBody() // {ExecuteActionButtonProjectBody} 
};
api.executeActionButtonProject(project, opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://dashboard.conradconnect.de/paasapi/

ClassMethodHTTP requestDescription
ConradConnectPaasApi.ActionButtonInteractionApiexecuteActionButtonProjectPOST /abstraction/do/{project}
ConradConnectPaasApi.ActionButtonInteractionApilistActionButtonProjectsGET /abstraction/do
ConradConnectPaasApi.DeviceInteractionApiactuateDevicePOST /abstraction/device/{device}/actuatePerform an action on a device
ConradConnectPaasApi.DeviceInteractionApigetDeviceDataForPropertyGET /abstraction/device/{device}/data/{property}Get historical data for a readable property of a device
ConradConnectPaasApi.DeviceInteractionApigetDeviceEventSubscriptionsGET /abstraction/subscriptionsGet a list of running subscriptions, started by the abstraction API
ConradConnectPaasApi.DeviceInteractionApigetDeviceTypesGET /abstraction/device-typesReturns a list of supported device types
ConradConnectPaasApi.DeviceInteractionApigetDevicesSummaryGET /abstraction/list-allReturns the current state of the abstraction layer with complete list of all currently used types and property and event names.
ConradConnectPaasApi.DeviceInteractionApigetLatestDeviceDataForPropertyGET /abstraction/device/{device}/data/{property}/latestGet the latest value for a readable property of a device
ConradConnectPaasApi.DeviceInteractionApigetUserDevicesGET /abstraction/deviceQuery devices of a user
ConradConnectPaasApi.DeviceInteractionApisubscribeToDeviceEventPOST /abstraction/device/{device}/eventSubscribe to an event of a device
ConradConnectPaasApi.DeviceInteractionApiunsubscribeFromDeviceEventDELETE /abstraction/event/{subscription}Unsubscribes from an event
ConradConnectPaasApi.OAuthEndpointsApipostOauthPasswordPOST /oauth/token#pExchange either a username and password for an access and refresh token.
ConradConnectPaasApi.OAuthEndpointsApipostOauthRefreshPOST /oauth/token#rExchange either a refresh token for an access token.
ConradConnectPaasApi.ProviderAuthenticationManagementApiconnectProviderPOST /providers/{provider}/connect
ConradConnectPaasApi.ProviderAuthenticationManagementApidisconnectProviderPOST /providers/{provider}/disconnect
ConradConnectPaasApi.ProviderAuthenticationManagementApidisconnectProviderAndDeleteDataPOST /providers/{provider}/disconnect-and-delete-data
ConradConnectPaasApi.ProviderAuthenticationManagementApigetProvidersListGET /providers
ConradConnectPaasApi.ProviderAuthenticationManagementApirefreshProviderPOST /providers/{provider}/refresh
ConradConnectPaasApi.TemperatureSchedulesApicreateTemperatureSchedulePOST /temperature-schedulesCreate a temperature schedule
ConradConnectPaasApi.TemperatureSchedulesApideleteTemperatureScheduleDELETE /temperature-schedules/{schedule}Delete a temperature schedule by ID
ConradConnectPaasApi.TemperatureSchedulesApigetTemperatureScheduleGET /temperature-schedules/{schedule}Get a temperature schedule by ID
ConradConnectPaasApi.TemperatureSchedulesApigetTemperatureSchedulesGET /temperature-schedulesGet a list of temperature schedules
ConradConnectPaasApi.UserManagementApicreateUserPOST /usersCreate a new user
ConradConnectPaasApi.UserManagementApideleteMeDELETE /users/meDelete authenticated user
ConradConnectPaasApi.UserManagementApigetMeGET /users/meGet authenticated user
ConradConnectPaasApi.UserManagementApigetUsersGET /usersGet the list of accessible users
ConradConnectPaasApi.UserManagementApiupdateMePATCH /users/meUpdate authenticated user
ConradConnectPaasApi.UserStatisticsApigetStatsGET /stats/users-with-devicesGet the list of users with devices and the number of devices per provider

Documentation for Models

Documentation for Authorization

accessToken

httpBasicClientCredentials

  • Type: HTTP basic authentication