0.10.21 • Published 4 years ago

amphoradata v0.10.21

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

amphoradata

Amphoradata - JavaScript client for amphoradata API for interacting with the Amphora Data platform. This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 0.9.7
  • Package version: 0.9.7
  • Build package: org.openapitools.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 amphoradata --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 amphoradata 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 Amphoradata = require('amphoradata');

var defaultClient = Amphoradata.ApiClient.instance;
// Configure API key authorization: Bearer
var Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix['Authorization'] = "Token"

var api = new Amphoradata.AmphoraeApi()
var id = "id_example"; // {String} Amphora Id.
var organisationAccessRule = new Amphoradata.OrganisationAccessRule(); // {OrganisationAccessRule} The rule to create.
var opts = {
  'xAmphoradataVersion': "xAmphoradataVersion_example" // {String} API Version Number
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.amphoraeAccessControlsCreateForOrganisation(id, organisationAccessRule, opts, callback);

Documentation for API Endpoints

All URIs are relative to https://app.amphoradata.com

ClassMethodHTTP requestDescription
Amphoradata.AmphoraeApiamphoraeAccessControlsCreateForOrganisationPOST /api/amphorae/{id}/AccessControls/ForOrganisationCreates an Access Control Rule on this Amphora.
Amphoradata.AmphoraeApiamphoraeAccessControlsCreateForUserPOST /api/amphorae/{id}/AccessControls/ForUserCreates an Access Control rule on this Amphora.
Amphoradata.AmphoraeApiamphoraeAccessControlsDeleteDELETE /api/amphorae/{id}/AccessControls/{ruleId}Deletes an Access Control on this Amphora.
Amphoradata.AmphoraeApiamphoraeAccessControlsGetOrganisationRulesGET /api/amphorae/{id}/AccessControls/ForOrganisationGet's the list of access rules applied to organisations.
Amphoradata.AmphoraeApiamphoraeAccessControlsGetUserRulesGET /api/amphorae/{id}/AccessControls/ForUserGet's the list of access rules applied to users.
Amphoradata.AmphoraeApiamphoraeCreatePOST /api/amphoraeCreates a new empty Amphora in the user's organisation.
Amphoradata.AmphoraeApiamphoraeDeleteDELETE /api/amphorae/{id}Deletes an Amphora.
Amphoradata.AmphoraeApiamphoraeFilesCreateFileRequestPOST /api/amphorae/{id}/files/{file}Creates a file. Returns a blob URL to upload to.
Amphoradata.AmphoraeApiamphoraeFilesDeleteFileDELETE /api/amphorae/{id}/files/{file}Get's the contents of a file. Returns application/octet-stream.
Amphoradata.AmphoraeApiamphoraeFilesDownloadFileGET /api/amphorae/{id}/files/{file}Get's the contents of a file. Returns application/octet-stream.
Amphoradata.AmphoraeApiamphoraeFilesListFilesGET /api/amphorae/{id}/filesGet's a list of an Amphora's files.
Amphoradata.AmphoraeApiamphoraeFilesWriteFileMetadataPOST /api/amphorae/{id}/files/{file}/meta
Amphoradata.AmphoraeApiamphoraeReadGET /api/amphorae/{id}Get's details of an Amphora by Id.
Amphoradata.AmphoraeApiamphoraeSignalsCreateSignalPOST /api/amphorae/{id}/signalsAssociates a signal with an Amphora. Signal is created if not existing.
Amphoradata.AmphoraeApiamphoraeSignalsGetSignalGET /api/amphorae/{id}/signals/{property}Get's the signals associated with an Amphora.
Amphoradata.AmphoraeApiamphoraeSignalsGetSignalsGET /api/amphorae/{id}/signalsGet's the signals associated with an Amphora.
Amphoradata.AmphoraeApiamphoraeSignalsUpdateSignalPUT /api/amphorae/{id}/signals/{signalId}Associates a signal with an Amphora. Signal is created if not existing.
Amphoradata.AmphoraeApiamphoraeSignalsUploadSignalPOST /api/amphorae/{id}/signals/values
Amphoradata.AmphoraeApiamphoraeSignalsUploadSignal2POST /api/amphorae/{id}/signalValues
Amphoradata.AmphoraeApiamphoraeSignalsUploadSignalBatchPOST /api/amphorae/{id}/signals/batchvalues
Amphoradata.AmphoraeApiamphoraeSignalsUploadSignalBatch2POST /api/amphorae/{id}/batchSignalValues
Amphoradata.AmphoraeApiamphoraeUpdatePUT /api/amphorae/{id}Updates the details of an Amphora by Id.
Amphoradata.AmphoraeApipurchasesPurchasePOST /api/Amphorae/{id}/PurchasesPurchases an Amphora as the logged in user.
Amphoradata.AuthenticationApiauthenticationRequestTokenPOST /api/authentication/requestReturns a JWT (JSON Web Token).
Amphoradata.IdentityApiidentityGetGET /identity
Amphoradata.MarketApimarketFindGET /api/market/searchFinds Amphora using a fuzzy search.
Amphoradata.MarketApimarketLookupLocationGET /api/location/fuzzyExecutes a fuzzy location search.
Amphoradata.OrganisationsApiaccountGetPlanGET /api/Organisations/{id}/Account/PlanGet's an Organisation's plan information.
Amphoradata.OrganisationsApiaccountReadGET /api/Organisations/{id}/AccountGet's an Organisation's account information.
Amphoradata.OrganisationsApiorganisationsCreatePOST /api/organisationsCreates a new Organisation. This will assign the logged in user to the organisation.
Amphoradata.OrganisationsApiorganisationsDeleteDELETE /api/organisations/{id}Deletes an organisation.
Amphoradata.OrganisationsApiorganisationsReadGET /api/organisations/{id}Gets an organisation's details.
Amphoradata.OrganisationsApiorganisationsUpdatePUT /api/organisations/{id}Updates an organisation.
Amphoradata.OrganisationsApitermsAndConditionsCreatePOST /api/Organisations/{id}/TermsAndConditionsAdds new Terms and Conditions to your Organisations T/C Library.
Amphoradata.OrganisationsApitermsAndConditionsReadGET /api/Organisations/{id}/TermsAndConditionsGet's a list of an Organisation's Terms and Conditions.
Amphoradata.SearchApisearchSearchAmphoraePOST /api/search/amphoraeSearches for Amphorae.
Amphoradata.SearchApisearchSearchAmphoraeByLocationGET /api/search/amphorae/byLocationSearches for Amphorae by loction.
Amphoradata.SearchApisearchSearchAmphoraeByOrganisationGET /api/search/amphorae/byOrganisationSearches for Amphorae in an Organisation.
Amphoradata.SearchApisearchSearchOrganisationsGET /api/search/organisationsSearches for Organisations with fuzzy search.
Amphoradata.TimeSeriesApitimeSeriesQueryTimeSeriesPOST /api/timeseries/queryUpdates the details of an Amphora by Id.
Amphoradata.UsersApiusersCreatePOST /api/usersCreates a new User. Returns the password.
Amphoradata.UsersApiusersReadSelfGET /api/users/selfGet's logged in users information.
Amphoradata.VersionApiversionGetCurrentVersionGET /api/versionGet's the current server version.

Documentation for Models

Documentation for Authorization

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header
0.10.21-alpha

4 years ago

0.10.21

4 years ago

0.10.18

4 years ago

0.10.16

4 years ago

0.10.15

4 years ago

0.10.14-dev.1

4 years ago

0.10.14

4 years ago

0.10.8-dev.1

4 years ago

0.10.6-dev.2

4 years ago

0.10.6-dev.1

4 years ago

0.10.5-dev2

4 years ago

0.10.5-dev1

4 years ago

0.10.4

4 years ago

0.9.8-dev1

4 years ago

0.9.8-dev2

4 years ago

0.9.7

4 years ago

0.7.2

4 years ago

0.7.1

4 years ago