amphoradata v0.10.21
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
Class | Method | HTTP request | Description |
---|---|---|---|
Amphoradata.AmphoraeApi | amphoraeAccessControlsCreateForOrganisation | POST /api/amphorae/{id}/AccessControls/ForOrganisation | Creates an Access Control Rule on this Amphora. |
Amphoradata.AmphoraeApi | amphoraeAccessControlsCreateForUser | POST /api/amphorae/{id}/AccessControls/ForUser | Creates an Access Control rule on this Amphora. |
Amphoradata.AmphoraeApi | amphoraeAccessControlsDelete | DELETE /api/amphorae/{id}/AccessControls/{ruleId} | Deletes an Access Control on this Amphora. |
Amphoradata.AmphoraeApi | amphoraeAccessControlsGetOrganisationRules | GET /api/amphorae/{id}/AccessControls/ForOrganisation | Get's the list of access rules applied to organisations. |
Amphoradata.AmphoraeApi | amphoraeAccessControlsGetUserRules | GET /api/amphorae/{id}/AccessControls/ForUser | Get's the list of access rules applied to users. |
Amphoradata.AmphoraeApi | amphoraeCreate | POST /api/amphorae | Creates a new empty Amphora in the user's organisation. |
Amphoradata.AmphoraeApi | amphoraeDelete | DELETE /api/amphorae/{id} | Deletes an Amphora. |
Amphoradata.AmphoraeApi | amphoraeFilesCreateFileRequest | POST /api/amphorae/{id}/files/{file} | Creates a file. Returns a blob URL to upload to. |
Amphoradata.AmphoraeApi | amphoraeFilesDeleteFile | DELETE /api/amphorae/{id}/files/{file} | Get's the contents of a file. Returns application/octet-stream. |
Amphoradata.AmphoraeApi | amphoraeFilesDownloadFile | GET /api/amphorae/{id}/files/{file} | Get's the contents of a file. Returns application/octet-stream. |
Amphoradata.AmphoraeApi | amphoraeFilesListFiles | GET /api/amphorae/{id}/files | Get's a list of an Amphora's files. |
Amphoradata.AmphoraeApi | amphoraeFilesWriteFileMetadata | POST /api/amphorae/{id}/files/{file}/meta | |
Amphoradata.AmphoraeApi | amphoraeRead | GET /api/amphorae/{id} | Get's details of an Amphora by Id. |
Amphoradata.AmphoraeApi | amphoraeSignalsCreateSignal | POST /api/amphorae/{id}/signals | Associates a signal with an Amphora. Signal is created if not existing. |
Amphoradata.AmphoraeApi | amphoraeSignalsGetSignal | GET /api/amphorae/{id}/signals/{property} | Get's the signals associated with an Amphora. |
Amphoradata.AmphoraeApi | amphoraeSignalsGetSignals | GET /api/amphorae/{id}/signals | Get's the signals associated with an Amphora. |
Amphoradata.AmphoraeApi | amphoraeSignalsUpdateSignal | PUT /api/amphorae/{id}/signals/{signalId} | Associates a signal with an Amphora. Signal is created if not existing. |
Amphoradata.AmphoraeApi | amphoraeSignalsUploadSignal | POST /api/amphorae/{id}/signals/values | |
Amphoradata.AmphoraeApi | amphoraeSignalsUploadSignal2 | POST /api/amphorae/{id}/signalValues | |
Amphoradata.AmphoraeApi | amphoraeSignalsUploadSignalBatch | POST /api/amphorae/{id}/signals/batchvalues | |
Amphoradata.AmphoraeApi | amphoraeSignalsUploadSignalBatch2 | POST /api/amphorae/{id}/batchSignalValues | |
Amphoradata.AmphoraeApi | amphoraeUpdate | PUT /api/amphorae/{id} | Updates the details of an Amphora by Id. |
Amphoradata.AmphoraeApi | purchasesPurchase | POST /api/Amphorae/{id}/Purchases | Purchases an Amphora as the logged in user. |
Amphoradata.AuthenticationApi | authenticationRequestToken | POST /api/authentication/request | Returns a JWT (JSON Web Token). |
Amphoradata.IdentityApi | identityGet | GET /identity | |
Amphoradata.MarketApi | marketFind | GET /api/market/search | Finds Amphora using a fuzzy search. |
Amphoradata.MarketApi | marketLookupLocation | GET /api/location/fuzzy | Executes a fuzzy location search. |
Amphoradata.OrganisationsApi | accountGetPlan | GET /api/Organisations/{id}/Account/Plan | Get's an Organisation's plan information. |
Amphoradata.OrganisationsApi | accountRead | GET /api/Organisations/{id}/Account | Get's an Organisation's account information. |
Amphoradata.OrganisationsApi | organisationsCreate | POST /api/organisations | Creates a new Organisation. This will assign the logged in user to the organisation. |
Amphoradata.OrganisationsApi | organisationsDelete | DELETE /api/organisations/{id} | Deletes an organisation. |
Amphoradata.OrganisationsApi | organisationsRead | GET /api/organisations/{id} | Gets an organisation's details. |
Amphoradata.OrganisationsApi | organisationsUpdate | PUT /api/organisations/{id} | Updates an organisation. |
Amphoradata.OrganisationsApi | termsAndConditionsCreate | POST /api/Organisations/{id}/TermsAndConditions | Adds new Terms and Conditions to your Organisations T/C Library. |
Amphoradata.OrganisationsApi | termsAndConditionsRead | GET /api/Organisations/{id}/TermsAndConditions | Get's a list of an Organisation's Terms and Conditions. |
Amphoradata.SearchApi | searchSearchAmphorae | POST /api/search/amphorae | Searches for Amphorae. |
Amphoradata.SearchApi | searchSearchAmphoraeByLocation | GET /api/search/amphorae/byLocation | Searches for Amphorae by loction. |
Amphoradata.SearchApi | searchSearchAmphoraeByOrganisation | GET /api/search/amphorae/byOrganisation | Searches for Amphorae in an Organisation. |
Amphoradata.SearchApi | searchSearchOrganisations | GET /api/search/organisations | Searches for Organisations with fuzzy search. |
Amphoradata.TimeSeriesApi | timeSeriesQueryTimeSeries | POST /api/timeseries/query | Updates the details of an Amphora by Id. |
Amphoradata.UsersApi | usersCreate | POST /api/users | Creates a new User. Returns the password. |
Amphoradata.UsersApi | usersReadSelf | GET /api/users/self | Get's logged in users information. |
Amphoradata.VersionApi | versionGetCurrentVersion | GET /api/version | Get's the current server version. |
Documentation for Models
- Amphoradata.AccessRuleDtoBase
- Amphoradata.Account
- Amphoradata.Address
- Amphoradata.AggregateSeries
- Amphoradata.AggregateVariable
- Amphoradata.AmphoraUser
- Amphoradata.AmphoraUserAllOf
- Amphoradata.AttributeStore
- Amphoradata.BaseAmphoraUser
- Amphoradata.BasicAmphora
- Amphoradata.BasicAmphoraAllOf
- Amphoradata.CategorySet
- Amphoradata.Classification
- Amphoradata.CreateAmphora
- Amphoradata.CreateAmphoraAllOf
- Amphoradata.CreateAmphoraUser
- Amphoradata.CreateAmphoraUserAllOf
- Amphoradata.DateTimeRange
- Amphoradata.DetailedAmphora
- Amphoradata.DetailedAmphoraAllOf
- Amphoradata.EditAmphora
- Amphoradata.EditAmphoraAllOf
- Amphoradata.Entity
- Amphoradata.EntryPoint
- Amphoradata.EventProperty
- Amphoradata.FuzzySearchResponse
- Amphoradata.GetEvents
- Amphoradata.GetSeries
- Amphoradata.LoginRequest
- Amphoradata.Name
- Amphoradata.NumericVariable
- Amphoradata.Organisation
- Amphoradata.OrganisationAccessRule
- Amphoradata.OrganisationAccessRuleAllOf
- Amphoradata.OrganisationAllOf
- Amphoradata.PagedResponse
- Amphoradata.PlanInformation
- Amphoradata.PlanTypes
- Amphoradata.Poi
- Amphoradata.Position
- Amphoradata.ProblemDetails
- Amphoradata.PropertyValues
- Amphoradata.PropertyValuesAllOf
- Amphoradata.QueryRequest
- Amphoradata.QueryResultPage
- Amphoradata.QueryResultPageAllOf
- Amphoradata.Result
- Amphoradata.SearchParameters
- Amphoradata.Signal
- Amphoradata.Summary
- Amphoradata.TermsAndConditions
- Amphoradata.Tsx
- Amphoradata.UpdateSignal
- Amphoradata.UploadResponse
- Amphoradata.UserAccessRule
- Amphoradata.UserAccessRuleAllOf
- Amphoradata.Variable
- Amphoradata.Viewport
Documentation for Authorization
Bearer
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago