api_simca v1.0.3
api_simca
ApiSimca - JavaScript client for api_simca SIMCA API Client This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen For more information, please visit https://bitbucket.org/pdg-icesi/simca-backend
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 api_simca --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 api_simca from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
You should now be able to require('api_simca')
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 ApiSimca = require('api_simca');
var api = new ApiSimca.DatacontrollerApi()
var measurementId = 56; // {Number} measurementId
var pollutantId = 56; // {Number} pollutantId
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getMeasurementPollutantDataUsingGET(measurementId, pollutantId, callback);
Documentation for API Endpoints
All URIs are relative to http://localhost:8080
Class | Method | HTTP request | Description |
---|---|---|---|
ApiSimca.DatacontrollerApi | getMeasurementPollutantDataUsingGET | GET /api/data/v1/data | getMeasurementPollutantData |
ApiSimca.MeasurementcontrollerApi | addValuesToMeasurementUsingPOST | POST /api/measurement/v1/measurement/{measurementId}/add-values | Add values to a measurement |
ApiSimca.MeasurementcontrollerApi | createMeasurementUsingPOST | POST /api/measurement/v1/measurement | Create a measurement |
ApiSimca.MeasurementcontrollerApi | deleteMeasurementUsingDELETE | DELETE /api/measurement/v1/measurement/{measurementId} | Delete a measurement |
ApiSimca.MeasurementcontrollerApi | editMeasurementUsingPUT | PUT /api/measurement/v1/measurement | Edit a measurement |
ApiSimca.MeasurementcontrollerApi | getMeasurementByIdUsingGET | GET /api/measurement/v1/measurement/{measurementId} | Get measurement by id |
ApiSimca.MeasurementcontrollerApi | getMeasurementUsingGET | GET /api/measurement/v1/measurements | Get measurements (optional filters) |
ApiSimca.PlacecontrollerApi | createPlaceUsingPOST | POST /api/place/v1/place | Create a place |
ApiSimca.PlacecontrollerApi | deleteLugarUsingDELETE | DELETE /api/place/v1/place/{idPlace} | Delete a place |
ApiSimca.PlacecontrollerApi | editPlaceUsingPUT | PUT /api/place/v1/place | Edit a place |
ApiSimca.PlacecontrollerApi | getPlaceUsingGET | GET /api/place/v1/place/{idPlace} | Get a place |
ApiSimca.PlacecontrollerApi | getPlacesUsingGET | GET /api/place/v1/places | Get all places |
ApiSimca.PollutantcontrollerApi | createPollutantUsingPOST | POST /api/pollutant/v1/pollutant | Create a pollutant |
ApiSimca.PollutantcontrollerApi | deletePollutantUsingDELETE | DELETE /api/pollutant/v1/pollutant/{idPollutant} | Delete a pollutant |
ApiSimca.PollutantcontrollerApi | editPollutantUsingPUT | PUT /api/pollutant/v1/pollutant | Edit a pollutant |
ApiSimca.PollutantcontrollerApi | getPollutantUsingGET | GET /api/pollutant/v1/pollutant/{idPollutant} | Get a pollutant |
ApiSimca.PollutantcontrollerApi | getPollutantsUsingGET | GET /api/pollutant/v1/pollutants | Get all pollutants |
ApiSimca.TransactioncontrollerApi | createPollutantUsingPOST1 | POST /api/transaction/v1/donation | Handle transaction |
ApiSimca.UsercontrollerApi | addUserUsingPOST | POST /api/user/v1/user | Create a user |
ApiSimca.UsercontrollerApi | checkEmailConfirmationStatusUsingGET | GET /api/user/v1/confirm-email | Check an email confirmation status |
ApiSimca.UsercontrollerApi | checkPasswordResetRequestStatusUsingGET | GET /api/user/v1/password-reset | Check password reset request status |
ApiSimca.UsercontrollerApi | confirmEmailUsingPUT | PUT /api/user/v1/confirm-email | Confirm email account |
ApiSimca.UsercontrollerApi | deleteUserUsingDELETE | DELETE /api/user/v1/user | Delete a user |
ApiSimca.UsercontrollerApi | getUserByUsernameUsingGET | GET /api/user/v1/user/by-username/{userName} | Get user by username |
ApiSimca.UsercontrollerApi | getUserUsingGET | GET /api/user/v1/user/{id} | Get user by id |
ApiSimca.UsercontrollerApi | getUsersUsingGET | GET /api/user/v1/users | Get all users |
ApiSimca.UsercontrollerApi | requestPasswordResetUsingPOST | POST /api/user/v1/password-reset | Request a password reset |
ApiSimca.UsercontrollerApi | resetPasswordUsingPUT | PUT /api/user/v1/password-reset | Reset user password |
ApiSimca.UserprofilecontrollerApi | editUserProfileUsingPUT | PUT /api/userprofile/v1/profile | Edit a user profile |
ApiSimca.UserprofilecontrollerApi | getUserProfileUsingGET | GET /api/userprofile/v1/profile/{id} | Get user profile |
Documentation for Models
- ApiSimca.AddMeasurementDTO
- ApiSimca.AddPlaceDTO
- ApiSimca.AddPollutantDTO
- ApiSimca.AddUserDTO
- ApiSimca.AddUserProfileDTO
- ApiSimca.AddValuesToMeasurementDTO
- ApiSimca.CountryDTO
- ApiSimca.MeasurementDTO
- ApiSimca.MeasurementDataDTO
- ApiSimca.MeasurementsDTO
- ApiSimca.PlaceDTO
- ApiSimca.PlacesDTO
- ApiSimca.PollutantDTO
- ApiSimca.PollutantsDTO
- ApiSimca.RequestPasswordResetDTO
- ApiSimca.ResetPasswordDTO
- ApiSimca.StateDTO
- ApiSimca.TimezoneDTO
- ApiSimca.UserDTO
- ApiSimca.UserProfileDTO
- ApiSimca.UsersDTO
Documentation for Authorization
oauth2schema
- Type: OAuth
- Flow: implicit
- Authorization URL: http://localhost:8080/oauth/token
- Scopes:
- global: Global authorization scope