Repository navigation
services meteringSettingsService
Baasic Metering Settings Service provides an easy way to consume Baasic Metering REST API end-points. In order to obtain a needed routes baasicMeteringSettingsService uses baasicMeteringSettingsRouteService.
Returns a promise that is resolved once the get action has been performed. Success response returns the metering resource.
Example:
baasicMeteringSettingsService.get()
.success(function (data) {
// perform success action here
})
.error(function (response, status, headers, config) {
// perform error handling here
});Returns a promise that is resolved once the update metering action has been performed; this action updates a metering resource. This route uses HAL enabled objects to obtain routes and therefore it doesn't apply baasicMeteringSettingsRouteService route template. Here is an example of how a route can be obtained from HAL enabled objects:
var params = baasicApiService.removeParams(meteringSettings);
var uri = params['model'].links('put').href;
Example:
// meteringSettings is a resource previously fetched using get action.
meteringSettings.dataRetentionPeriod = 60;
baasicMeteringSettingsService.update(meteringSettings)
.success(function (data) {
// perform success action here
})
.error(function (response, status, headers, config) {
// perform error handling here
});Provides direct access to routeService.
Example:
baasicMeteringSettingsService.routeService.get.expand(expandObject);Notes:
- Refer to the Baasic REST API for detailed information about available Baasic REST API end-points.
- All end-point objects are transformed by the associated route service.
(c) 2017 Mono Ltd
Author: Mono Ltd
License: MIT
(c) 2017 Mono Ltd.
Version: 1.0.0
Author: Mono Ltd.
License: MIT
Baasic Metering Navigation