0.8.1 • Published 2 years ago

apollo_algorithm_endpoints v0.8.1

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

apollo_algorithm_endpoints

ApolloAlgorithmEndpoints - JavaScript client for apolloalgorithm_endpoints A combined endpoint featuring: Algorithm Personalization Endpoint */personalize: Retrieve personalized parameters for edge-inference models. Cloud Inference Executor /execute: Queue cloud inference of user data. User Algorithm Data Histories /history: Retrieve historic inference data for a user and algorithm. Edge Inference Result Storage /save: Save the results from an edge inference consistent with cloud inference. Algorithm Versioning /versions: Retrieve the latest version info for models. Application State _/app*: Retrieve information about internal application state. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 0.8.1
  • Package version: 0.8.1
  • Build package: io.swagger.codegen.languages.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 apollo_algorithm_endpoints --save
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

Finally, switch to the directory you want to use your apollo_algorithm_endpoints from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('apollo_algorithm_endpoints') in javascript files from the directory you ran the last command above from.

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, that's to say your javascript file where you actually use this library):

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 ApolloAlgorithmEndpoints = require('apollo_algorithm_endpoints');

var defaultClient = ApolloAlgorithmEndpoints.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix['X-HAPPY-MP-SUB'] = "Token"

var api = new ApolloAlgorithmEndpoints.ActivityApi()

var payload = new ApolloAlgorithmEndpoints.Activityv0Inputs(); // {Activityv0Inputs} 

var opts = { 
  'xFields': "xFields_example" // {String} An optional fields mask
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.executePostActivityV0(payload, opts, callback);

Documentation for API Endpoints

All URIs are relative to https://api.happy.dev/apollo/v1

ClassMethodHTTP requestDescription
ApolloAlgorithmEndpoints.ActivityApiexecutePostActivityV0POST /execute/activity/v0Trigger cloud-based inference for the v0 ACTIVITY model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.ActivityApihistoryPostActivityV0POST /history/activity/v0Retrieve historical inference results for the v0 ACTIVITY model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.ActivityApisavePostActivityV0POST /save/activity/v0Stores inference results for the v0 ACTIVITY model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.ActivityApiversionsPostActivityLatestPOST /versions/activity/latestGet the latest version information for the ACTIVITY model
ApolloAlgorithmEndpoints.CstressApiexecutePostCstressV0POST /execute/cstress/v0Trigger cloud-based inference for the v0 CSTRESS model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.CstressApihistoryPostCstressV0POST /history/cstress/v0Retrieve historical inference results for the v0 CSTRESS model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.CstressApihistoryPostCstressV2POST /history/cstress/v2Retrieve historical inference results for the v2 CSTRESS model at specific versions '2.X.Y'
ApolloAlgorithmEndpoints.CstressApihistoryPostCstressV3POST /history/cstress/v3Retrieve historical inference results for the v3 CSTRESS model at specific versions '3.X.Y'
ApolloAlgorithmEndpoints.CstressApipersonalizePostCstressV0p0POST /personalize/cstress/v0p0Retrieve personalized algorithm parameters for the v0 CSTRESS model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.CstressApipersonalizePostCstressV2p2POST /personalize/cstress/v2p2Retrieve personalized algorithm parameters for the v2 CSTRESS model at specific versions '2.X.Y'
ApolloAlgorithmEndpoints.CstressApipersonalizePostCstressV3p3POST /personalize/cstress/v3p3Retrieve personalized algorithm parameters for the v3 CSTRESS model at specific versions '3.X.Y'
ApolloAlgorithmEndpoints.CstressApisavePostCstressV0POST /save/cstress/v0Stores inference results for the v0 CSTRESS model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.CstressApisavePostCstressV2POST /save/cstress/v2Stores inference results for the v2 CSTRESS model at specific versions '2.X.Y'
ApolloAlgorithmEndpoints.CstressApisavePostCstressV3POST /save/cstress/v3Stores inference results for the v3 CSTRESS model at specific versions '3.X.Y'
ApolloAlgorithmEndpoints.CstressApiversionsPostCstressLatestPOST /versions/cstress/latestGet the latest version information for the CSTRESS model
ApolloAlgorithmEndpoints.CstressprsApiexecutePostCstressprsV0POST /execute/cstressprs/v0Trigger cloud-based inference for the v0 CSTRESS_PRS model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.CstressprsApiexecutePostCstressprsV2POST /execute/cstressprs/v2Trigger cloud-based inference for the v2 CSTRESS_PRS model at specific versions '2.X.Y'
ApolloAlgorithmEndpoints.CstressprsApiexecutePostCstressprsV3POST /execute/cstressprs/v3Trigger cloud-based inference for the v3 CSTRESS_PRS model at specific versions '3.X.Y'
ApolloAlgorithmEndpoints.CstressprsApihistoryPostCstressprsV0POST /history/cstressprs/v0Retrieve historical inference results for the v0 CSTRESS_PRS model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.CstressprsApihistoryPostCstressprsV2POST /history/cstressprs/v2Retrieve historical inference results for the v2 CSTRESS_PRS model at specific versions '2.X.Y'
ApolloAlgorithmEndpoints.CstressprsApihistoryPostCstressprsV3POST /history/cstressprs/v3Retrieve historical inference results for the v3 CSTRESS_PRS model at specific versions '3.X.Y'
ApolloAlgorithmEndpoints.CstressprsApisavePostCstressprsV0POST /save/cstressprs/v0Stores inference results for the v0 CSTRESS_PRS model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.CstressprsApisavePostCstressprsV2POST /save/cstressprs/v2Stores inference results for the v2 CSTRESS_PRS model at specific versions '2.X.Y'
ApolloAlgorithmEndpoints.CstressprsApisavePostCstressprsV3POST /save/cstressprs/v3Stores inference results for the v3 CSTRESS_PRS model at specific versions '3.X.Y'
ApolloAlgorithmEndpoints.CstressprsApiversionsPostCstressprsLatestPOST /versions/cstressprs/latestGet the latest version information for the CSTRSS_PRS model
ApolloAlgorithmEndpoints.HrApiexecutePostHrV0POST /execute/hr/v0Trigger cloud-based inference for the v0 HR model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.HrApiversionsPostHrLatestPOST /versions/hr/latestGet the latest version information for the HR model
ApolloAlgorithmEndpoints.OnoffApipersonalizePostOnoffV1p1POST /personalize/onoff/v1p1Retrieve personalized algorithm parameters for the v1 ON_OFF model at specific versions '1.X.Y'
ApolloAlgorithmEndpoints.OnoffApiversionsPostOnoffLatestPOST /versions/onoff/latestGet the latest version information for the ON_OFF model
ApolloAlgorithmEndpoints.OnoffprsApiexecutePostOnoffprsV1POST /execute/onoffprs/v1Trigger cloud-based inference for the v1 ON_OFF_PRS model at specific versions '1.X.Y'
ApolloAlgorithmEndpoints.OnoffprsApisavePostOnoffprsV1POST /save/onoffprs/v1Stores inference results for the v1 ON_OFF_PRS model at specific versions '1.X.Y'
ApolloAlgorithmEndpoints.OnoffprsApiversionsPostOnoffprsLatestPOST /versions/onoffprs/latestGet the latest version information for the ON_OFF_PRS model
ApolloAlgorithmEndpoints.ProbesApiprobesHealthzGetGET /probes/healthz
ApolloAlgorithmEndpoints.ProbesApiprobesReadinessGetGET /probes/readiness
ApolloAlgorithmEndpoints.SleepApiexecutePostSleepV0POST /execute/sleep/v0Trigger cloud-based inference for the v0 SLEEP model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.SleepApiexecutePostSleepV2POST /execute/sleep/v2Trigger cloud-based inference for the v2 SLEEP model at specific versions '2.X.Y'
ApolloAlgorithmEndpoints.SleepApihistoryPostSleepV0POST /history/sleep/v0Retrieve historical inference results for the v0 SLEEP model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.SleepApihistoryPostSleepV2POST /history/sleep/v2Retrieve historical inference results for the v2 SLEEP model at specific versions '2.X.Y'
ApolloAlgorithmEndpoints.SleepApipersonalizePostSleepV2p1POST /personalize/sleep/v2p1Retrieve personalized algorithm parameters for the v2 SLEEP model at specific versions '2.X.Y'
ApolloAlgorithmEndpoints.SleepApisavePostSleepV0POST /save/sleep/v0Stores inference results for the v0 SLEEP model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.SleepApisavePostSleepV2POST /save/sleep/v2Stores inference results for the v2 SLEEP model at specific versions '2.X.Y'
ApolloAlgorithmEndpoints.SleepApiversionsPostSleepLatestPOST /versions/sleep/latestGet the latest version information for the SLEEP model
ApolloAlgorithmEndpoints.SleepprsApihistoryPostSleepprsV1POST /history/sleepprs/v1Retrieve historical inference results for the v1 SLEEP_PRS model at specific versions '1.X.Y'
ApolloAlgorithmEndpoints.SleepprsApisavePostSleepprsV1POST /save/sleepprs/v1Stores inference results for the v1 SLEEP_PRS model at specific versions '1.X.Y'
ApolloAlgorithmEndpoints.SleepprsApiversionsPostSleepprsLatestPOST /versions/sleepprs/latestGet the latest version information for the SLEEP_PRS model
ApolloAlgorithmEndpoints.StresscapacityApiexecutePostStresscapacityV0POST /execute/stresscapacity/v0Trigger cloud-based inference for the v0 STRESS_CAPACITY model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.StresscapacityApihistoryPostStresscapacityV0POST /history/stresscapacity/v0Retrieve historical inference results for the v0 STRESS_CAPACITY model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.StresscapacityApisavePostStresscapacityV0POST /save/stresscapacity/v0Stores inference results for the v0 STRESS_CAPACITY model at specific versions '0.X.Y'
ApolloAlgorithmEndpoints.StresscapacityApiversionsPostStresscapacityLatestPOST /versions/stresscapacity/latestGet the latest version information for the STRESS_CAPACITY model

Documentation for Models

Documentation for Authorization

APIKeyHeader

  • Type: API key
  • API key parameter name: X-HAPPY-MP-SUB
  • Location: HTTP header
0.8.1

2 years ago