golemio-sdk
Version:
TypeScript SDK for api.golemio.cz
995 lines (980 loc) • 223 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* Golemio API
* <p><img src=\"https://storage.golemio.cz/golemiocz/images/golemioapi_logos.png\" alt=\"Logos\" /></p> <p><b>Toto je dokumentace REST API projektu pražské datové platformy Golemio.</b></p> <p>Veškeré dotazy prosím směřujte na <a href=\"mailto:golemio@operatorict.cz?subject=golemioapi\">golemio@operatorict.cz</a>.</p> <p>Dokumentace je v anglickém jazyce. Více informací o projektu naleznete na <a href=\"https://www.golemio.cz/\">www.golemio.cz</a>.</p> <H1>Description</H1> <p><b>This documentation covers the RESTful API of the Golemio Prague Data Platform project, specifically detailing the Output Gateway API.</b></p> <p>Support is accessible via <a href=\"mailto:golemio@operatorict.cz?subject=golemioapi\">golemio@operatorict.cz</a>.</p> <p>For more information about Golemio, please visit the website <a href=\"https://www.golemio.cz/\">www.golemio.cz</a>.</p> <H2>Golemio API documentation:</H2> <li>👉 Main Golemio API</li> <li><a href=\"https://api.golemio.cz/docs/public-openapi/\">Open Data Golemio API</a></li> <li><a href=\"https://api.golemio.cz/input-gateway/docs/openapi/\">Golemio Input Gateway API</a></li> <li><a href=\"https://api.golemio.cz/pid/docs/openapi/\">Public Transport Golemio API</a></li> <li><a href=\"https://api.golemio.cz/pid/input-gateway/docs/openapi/\">Public Transport Golemio Input Gateway API</a></li> <H1>General info</H1> <H2>Authorization</H2> <p>Generate your token at <a href=\"https://api.golemio.cz/api-keys\">api.golemio.cz/api-keys</a>.</p> <p><b>Use the token as the value of the X-Access-Token header.</b></p> <H1>Usage</H1> <H2>Pagination</H2> <p>The API returns a maximum of 10,000 objects/rows per request. You can specify a lower number by adding the <code>?limit</code> URL parameter.</p> <p> This limit may vary depending on the specific route; please refer to the description of parameters for each route. To retrieve more data, use multiple requests with the <code>?limit&offset</code> parameters. Refer to the examples below. </p> <H2>Requests rate</H2> <p>By default, each API key has a rate limit of 20 requests per 8 seconds.</p> <H2>Compression</H2> <p>By default, the Content-Encoding header is set to gzip (if requested). If the raw response is less than 1 KB, the data is returned uncompressed, and the Content-Encoding header is not set.</p> <H2>Open Data</H2> <p><img src=\"https://img.shields.io/badge/opendata-available-green\" alt=\"golemioapi-opendata-badge\" /></p> <p>This badge indicates that the data is available for public use as Open Data.</p>
*
* The version of the OpenAPI document: 1.0.0
* Contact: golemio@operatorict.cz
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { defaultConfigurationParameters } from './configuration';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setSearchParams, toPathString } from './common';
// @ts-ignore
import { COLLECTION_FORMATS, BaseAPI } from './base';
export class GolemioApi {
constructor(configurationParams, axios) {
const configuration = Object.assign({}, defaultConfigurationParameters, configurationParams);
if (!axios)
axios = globalAxios.create();
this.AirQualityV2Api = new GolemioApi.AirQualityV2Api(configuration, axios);
this.BicycleCountersV2Api = new GolemioApi.BicycleCountersV2Api(configuration, axios);
this.BulkyWasteV1Api = new GolemioApi.BulkyWasteV1Api(configuration, axios);
this.EnergeticsV2Api = new GolemioApi.EnergeticsV2Api(configuration, axios);
this.FloatingCarDataV2Api = new GolemioApi.FloatingCarDataV2Api(configuration, axios);
this.GBFSV2Api = new GolemioApi.GBFSV2Api(configuration, axios);
this.GardensV2Api = new GolemioApi.GardensV2Api(configuration, axios);
this.MVTMapsV2Api = new GolemioApi.MVTMapsV2Api(configuration, axios);
this.MVTSApi = new GolemioApi.MVTSApi(configuration, axios);
this.MedicalInstitutionsV2Api = new GolemioApi.MedicalInstitutionsV2Api(configuration, axios);
this.MicroclimateV2Api = new GolemioApi.MicroclimateV2Api(configuration, axios);
this.MunicipalAuthoritiesV2Api = new GolemioApi.MunicipalAuthoritiesV2Api(configuration, axios);
this.MunicipalLibrariesV2Api = new GolemioApi.MunicipalLibrariesV2Api(configuration, axios);
this.MunicipalPoliceStationsV2Api = new GolemioApi.MunicipalPoliceStationsV2Api(configuration, axios);
this.ParkingV1Api = new GolemioApi.ParkingV1Api(configuration, axios);
this.ParkingV2Api = new GolemioApi.ParkingV2Api(configuration, axios);
this.ParkingV2InternalApi = new GolemioApi.ParkingV2InternalApi(configuration, axios);
this.ParkingV3Api = new GolemioApi.ParkingV3Api(configuration, axios);
this.PedestriansV2Api = new GolemioApi.PedestriansV2Api(configuration, axios);
this.PlaygroundsV2Api = new GolemioApi.PlaygroundsV2Api(configuration, axios);
this.PragueCityDistrictsV2Api = new GolemioApi.PragueCityDistrictsV2Api(configuration, axios);
this.SharedBikesV2Api = new GolemioApi.SharedBikesV2Api(configuration, axios);
this.SharedCarsV2Api = new GolemioApi.SharedCarsV2Api(configuration, axios);
this.TrafficRestrictionsV2Api = new GolemioApi.TrafficRestrictionsV2Api(configuration, axios);
this.VehiclesharingV2Api = new GolemioApi.VehiclesharingV2Api(configuration, axios);
this.WasteCollectionV2Api = new GolemioApi.WasteCollectionV2Api(configuration, axios);
this.WasteCollectionV2InternalApi = new GolemioApi.WasteCollectionV2InternalApi(configuration, axios);
this.WasteCollectionYardsV2Api = new GolemioApi.WasteCollectionYardsV2Api(configuration, axios);
this.WazeV1Api = new GolemioApi.WazeV1Api(configuration, axios);
}
;
}
(function (GolemioApi) {
GolemioApi.CityDistrictFeatureGeometryTypeEnum = {
Polygon: 'Polygon',
MultiPolygon: 'MultiPolygon'
};
/**
* monthly_reading - hodnoty sčítané po měsících z 15 minutových spotřeb poskytovaných firmou PRE<br /> provider_value - data získaná od poskytovatelů energií<br /> dotcontrols_value - data získaná ze systémů VisApp firmy DotControls<br />
* @export
* @enum {string}
*/
GolemioApi.EnergeticsTypes = {
MonthlyReading: 'monthly_reading',
ProviderValue: 'provider_value',
DotcontrolsValue: 'dotcontrols_value'
};
/**
* core - Kumulovaný objem [m3]<br /> core2 - Kumulovaný přepočítaný objem [Nm3]<br /> EFwActi - Odběr činné energie [kWh]<br /> EFwActiVT - Odběr činné energie, vysoký tarif [kVArh]<br /> ERvReact - Dodávka jalové energie [kVArh]<br /> EFwReact - Odběr jalové energie [kVArh]<br /> raw - Číselník impulzů [imp]<br /> RSSI - Síla signálu [dBm]<br /> T - Teplota [°C]<br /> CO2 - Koncentrace CO2 [ppm]<br /> RH - Relativní vlhkost [%]<br /> EFwActiNT - Odběr činné energie, nízký tarif [kVArh]<br /> VOC - Míra koncentrace těkavých látek [%]<br /> VT - Vysoký tarif [kWh]<br /> NT - Nízký tarif [kWh]<br />
* @export
* @enum {string}
*/
GolemioApi.EnergeticsVariables = {
Core: 'core',
Core2: 'core2',
EfwActi: 'EFwActi',
EfwActiVt: 'EFwActiVT',
ErvReact: 'ERvReact',
EfwReact: 'EFwReact',
Raw: 'raw',
T: 'T',
Co2: 'CO2',
Rh: 'RH',
EfwActiNt: 'EFwActiNT',
Voc: 'VOC'
};
GolemioApi.GBFSGeofencingZonesJsonGeofencingZonesTypeEnum = {
FeatureCollection: 'FeatureCollection'
};
GolemioApi.GBFSJsonValueFeedsInnerNameEnum = {
Gbfs: 'gbfs',
GbfsVersions: 'gbfs_versions',
SystemInformation: 'system_information',
VehicleTypes: 'vehicle_types',
StationInformation: 'station_information',
StationStatus: 'station_status',
FreeBikeStatus: 'free_bike_status',
SystemHours: 'system_hours',
SystemAlerts: 'system_alerts',
SystemCalendar: 'system_calendar',
SystemRegions: 'system_regions',
SystemPricingPlans: 'system_pricing_plans',
GeofencingZones: 'geofencing_zones'
};
GolemioApi.GBFSStationInformationJsonStationsInnerRentalMethodsEnum = {
Key: 'key',
Creditcard: 'creditcard',
Paypass: 'paypass',
Applepay: 'applepay',
Androidpay: 'androidpay',
Transitcard: 'transitcard',
Accountnumber: 'accountnumber',
Phone: 'phone'
};
GolemioApi.GBFSStationInformationJsonStationsInnerStationAreaTypeEnum = {
MultiPolygon: 'MultiPolygon'
};
GolemioApi.GBFSVehicleTypesJsonVehicleTypesInnerFormFactorEnum = {
Bicycle: 'bicycle',
Car: 'car',
Moped: 'moped',
Other: 'other',
Scooter: 'scooter'
};
GolemioApi.GBFSVehicleTypesJsonVehicleTypesInnerPropulsionTypeEnum = {
Human: 'human',
ElectricAssist: 'electric_assist',
Electric: 'electric',
Combustion: 'combustion'
};
GolemioApi.GBFSVersionsJsonVersionsInnerVersionEnum = {
_11: '1.1',
_20: '2.0',
_21: '2.1',
_22: '2.2',
_30: '3.0'
};
GolemioApi.GBFSWrapperVersionEnum = {
_30: '3.0'
};
GolemioApi.GeoJSONFeatureTypeEnum = {
Feature: 'Feature'
};
GolemioApi.GeoJSONMultiPolygonTypeEnum = {
MultiPolygon: 'MultiPolygon'
};
GolemioApi.MedicalInstitutionPropertiesTypeGroupEnum = {
Pharmacies: 'pharmacies',
HealthCare: 'health_care'
};
GolemioApi.ParkingChargeChargeTypeEnum = {
Other: 'other',
Minimum: 'minimum',
Maximum: 'maximum'
};
GolemioApi.ParkingChargeBandPrimarySourceEnum = {
TskV2: 'tsk_v2'
};
GolemioApi.ParkingChargeBandPaymentMethodsEnum = {
CardOnline: 'card_online',
CardOffline: 'card_offline',
Litacka: 'litacka',
Cash: 'cash',
CoinsOnly: 'coins_only',
MobileApp: 'mobile_app',
SmsPayment: 'sms_payment',
ApplePay: 'apple_pay',
GooglePay: 'google_pay'
};
GolemioApi.ParkingChargeBandPaymentModeEnum = {
PrePaid: 'pre_paid',
PostPaid: 'post_paid'
};
GolemioApi.ParkingGeometryTypeEnum = {
Point: 'Point',
Polygon: 'Polygon',
MultiPolygon: 'MultiPolygon'
};
GolemioApi.ParkingLotFeatureGeometryTypeEnum = {
Point: 'Point',
Polygon: 'Polygon',
MultiPolygon: 'MultiPolygon'
};
GolemioApi.ParkingMachineGeometryTypeEnum = {
Point: 'Point',
Polygon: 'Polygon',
MultiPolygon: 'MultiPolygon'
};
GolemioApi.ParkingMachinePropertiesPrimarySourceEnum = {
TskV2: 'tsk_v2'
};
GolemioApi.ParkingMachinePropertiesMachineTypeEnum = {
PaymentMachine: 'payment_machine',
InfoBox: 'info_box'
};
GolemioApi.ParkingOccupancyMeasurementPrimarySourceEnum = {
TskV2: 'tsk_v2'
};
GolemioApi.ParkingPeriodsOfTimeDayInWeekEnum = {
Mo: 'Mo',
Tu: 'Tu',
We: 'We',
Th: 'Th',
Fr: 'Fr',
Sa: 'Sa',
Su: 'Su'
};
GolemioApi.ParkingPeriodsOfTimePhEnum = {
PhOnly: 'PH_only',
PhOff: 'PH_off'
};
GolemioApi.ParkingPeriodsOfTimeWithDurationDayInWeekEnum = {
Mo: 'Mo',
Tu: 'Tu',
We: 'We',
Th: 'Th',
Fr: 'Fr',
Sa: 'Sa',
Su: 'Su'
};
GolemioApi.ParkingPeriodsOfTimeWithDurationPhEnum = {
PhOnly: 'PH_only',
PhOff: 'PH_off'
};
GolemioApi.ParkingPropertiesPrimarySourceEnum = {
TskV2: 'tsk_v2'
};
GolemioApi.ParkingPropertiesParkingPolicyEnum = {
ParkAndRide: 'park_and_ride',
KissAndRide: 'kiss_and_ride',
Commercial: 'commercial',
Zone: 'zone',
ParkSharing: 'park_sharing',
CustomerOnly: 'customer_only'
};
GolemioApi.ParkingPropertiesParkingTypeEnum = {
OnStreet: 'on_street',
Underground: 'underground',
MultiStorey: 'multi_storey',
Surface: 'surface',
Rooftop: 'rooftop',
Other: 'other'
};
GolemioApi.ParkingPropertiesCentroidTypeEnum = {
Point: 'Point'
};
GolemioApi.ParkingReservationPropertiesReservationTypeEnum = {
Possible: 'possible',
NotPossible: 'not_possible',
Required: 'required'
};
GolemioApi.ParkingSpaceFeaturePropertiesParkingTypeEnum = {
ParkAndRide: 'park_and_ride',
ParkPaidPrivate: 'park_paid_private',
OnStreet: 'on_street',
ParkSharing: 'park_sharing',
DisabledParking: 'disabled_parking',
Underground: 'underground',
Other: 'other'
};
GolemioApi.ParkingSpaceFeaturePropertiesZoneTypeEnum = {
ZoneResidential: 'zone_residential',
ZoneMixed: 'zone_mixed',
ZoneVisitors: 'zone_visitors',
ZoneOther: 'zone_other',
ZoneFree: 'zone_free'
};
GolemioApi.ParkingSpaceGeometryTypeEnum = {
Point: 'Point',
Polygon: 'Polygon',
MultiPolygon: 'MultiPolygon'
};
GolemioApi.ParkingSpacePropertiesAccessDedicatedToEnum = {
Disabled: 'disabled',
Charging: 'charging',
Parent: 'parent',
Delivery: 'delivery',
Customer: 'customer',
Resident: 'resident',
Bus: 'bus',
Designated: 'designated',
Truck: 'truck',
Motorcycle: 'motorcycle',
Rv: 'RV'
};
GolemioApi.ParkingSpaceTariffPaymentMethodsEnum = {
CardOnline: 'card_online',
CardOffline: 'card_offline',
Cash: 'cash',
CoinsOnly: 'coins_only',
MobileApp: 'mobile_app',
Litacka: 'litacka',
SmsPayment: 'sms_payment',
ApplePay: 'apple_pay',
GooglePay: 'google_pay',
Unknown: 'unknown'
};
GolemioApi.ParkingSpaceTariffChargeChargeTypeEnum = {
Minimum: 'minimum',
Maximum: 'maximum',
AdditionalIntervalPrice: 'additional_interval_price',
SeasonTicket: 'season_ticket',
TemporaryPrice: 'temporary_price',
FirstIntervalPrice: 'first_interval_price',
FreeParking: 'free_parking',
Flat: 'flat',
Unknown: 'unknown',
Other: 'other'
};
GolemioApi.SharedCarTypeEnum = {
Feature: 'Feature'
};
GolemioApi.SharedCarAvailabilityIdEnum = {
NUMBER_1: 1,
NUMBER_2: 2
};
GolemioApi.SharedCarAvailabilityDescriptionEnum = {
Ihned: 'ihned',
DleDomluvySProvozovatelem: 'dle domluvy s provozovatelem'
};
GolemioApi.SharedCarFuelIdEnum = {
NUMBER_0: 0,
NUMBER_1: 1,
NUMBER_2: 2,
NUMBER_3: 3,
NUMBER_4: 4,
NUMBER_5: 5,
NUMBER_7: 7
};
GolemioApi.SharedCarFuelDescriptionEnum = {
Neznm: 'neznámý',
Benzn: 'benzín',
Nafta: 'nafta',
BenznLpg: 'benzín + LPG',
Elektina: 'elektřina',
Hybrid: 'hybrid',
Jin: 'jiný'
};
GolemioApi.SharedVehicleTypeEnum = {
Feature: 'Feature'
};
GolemioApi.SharedVehicleGeometryTypeEnum = {
Point: 'Point'
};
/**
* AirQualityV2Api - object-oriented interface
* @export
* @class AirQualityV2Api
* @extends {BaseAPI}
*/
class AirQualityV2Api extends BaseAPI {
constructor(configuration, axios = globalAxios) {
super(configuration, configuration.basePath, axios);
this.configuration = configuration;
this.axios = axios;
}
/**
*
* @summary GET Air Quality Station Component Types
* @param {AxiosRequestConfig} [options] Override http request option.
* @throws {RequiredError}
* @memberof AirQualityV2Api
*/
async v2AirqualitystationsComponenttypesGet(options = {}) {
const localVarPath = `/v2/airqualitystations/componenttypes`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const requestUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (this.configuration) {
baseOptions = this.configuration.baseOptions;
}
const axiosRequestConfig = { method: 'GET', ...baseOptions, ...options };
const requestHeaderParameter = {};
const requestQueryParameter = {};
// authentication ApiKeyAuth required
await setApiKeyToObject(requestHeaderParameter, "X-Access-Token", this.configuration);
setSearchParams(requestUrlObj, requestQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
axiosRequestConfig.headers = { ...requestHeaderParameter, ...headersFromBaseOptions, ...options.headers };
axiosRequestConfig["url"] = toPathString(requestUrlObj);
axiosRequestConfig["baseURL"] = this.configuration.basePath;
return this.axios.request(axiosRequestConfig);
}
/**
*
* @summary GET All Air Quality CHMI Stations
* @param {AirQualityV2ApiV2AirqualitystationsGetQueryParams} queryParams Query parameters.
* @param {AxiosRequestConfig} [options] Override http request option.
* @throws {RequiredError}
* @memberof AirQualityV2Api
*/
async v2AirqualitystationsGet(queryParams = {}, options = {}) {
const localVarPath = `/v2/airqualitystations`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const requestUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (this.configuration) {
baseOptions = this.configuration.baseOptions;
}
const axiosRequestConfig = { method: 'GET', ...baseOptions, ...options };
const requestHeaderParameter = {};
const requestQueryParameter = {};
// authentication ApiKeyAuth required
await setApiKeyToObject(requestHeaderParameter, "X-Access-Token", this.configuration);
if (queryParams.latlng !== undefined) {
requestQueryParameter['latlng'] = queryParams.latlng;
}
if (queryParams.range !== undefined) {
requestQueryParameter['range'] = queryParams.range;
}
if (queryParams.districts) {
requestQueryParameter['districts'] = queryParams.districts.join(COLLECTION_FORMATS.csv);
}
if (queryParams.limit !== undefined) {
requestQueryParameter['limit'] = queryParams.limit;
}
if (queryParams.offset !== undefined) {
requestQueryParameter['offset'] = queryParams.offset;
}
if (queryParams.updatedSince !== undefined) {
requestQueryParameter['updatedSince'] = queryParams.updatedSince;
}
setSearchParams(requestUrlObj, requestQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
axiosRequestConfig.headers = { ...requestHeaderParameter, ...headersFromBaseOptions, ...options.headers };
axiosRequestConfig["url"] = toPathString(requestUrlObj);
axiosRequestConfig["baseURL"] = this.configuration.basePath;
return this.axios.request(axiosRequestConfig);
}
/**
*
* @summary GET Air Quality Stations CHMI History
* @param {AirQualityV2ApiV2AirqualitystationsHistoryGetQueryParams} queryParams Query parameters.
* @param {AxiosRequestConfig} [options] Override http request option.
* @throws {RequiredError}
* @memberof AirQualityV2Api
*/
async v2AirqualitystationsHistoryGet(queryParams = {}, options = {}) {
const localVarPath = `/v2/airqualitystations/history`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const requestUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (this.configuration) {
baseOptions = this.configuration.baseOptions;
}
const axiosRequestConfig = { method: 'GET', ...baseOptions, ...options };
const requestHeaderParameter = {};
const requestQueryParameter = {};
// authentication ApiKeyAuth required
await setApiKeyToObject(requestHeaderParameter, "X-Access-Token", this.configuration);
if (queryParams.limit !== undefined) {
requestQueryParameter['limit'] = queryParams.limit;
}
if (queryParams.offset !== undefined) {
requestQueryParameter['offset'] = queryParams.offset;
}
if (queryParams.from !== undefined) {
requestQueryParameter['from'] = queryParams.from;
}
if (queryParams.to !== undefined) {
requestQueryParameter['to'] = queryParams.to;
}
if (queryParams.sensorId !== undefined) {
requestQueryParameter['sensorId'] = queryParams.sensorId;
}
setSearchParams(requestUrlObj, requestQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
axiosRequestConfig.headers = { ...requestHeaderParameter, ...headersFromBaseOptions, ...options.headers };
axiosRequestConfig["url"] = toPathString(requestUrlObj);
axiosRequestConfig["baseURL"] = this.configuration.basePath;
return this.axios.request(axiosRequestConfig);
}
/**
*
* @summary GET Air Quality Station Index Types
* @param {AxiosRequestConfig} [options] Override http request option.
* @throws {RequiredError}
* @memberof AirQualityV2Api
*/
async v2AirqualitystationsIndextypesGet(options = {}) {
const localVarPath = `/v2/airqualitystations/indextypes`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const requestUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (this.configuration) {
baseOptions = this.configuration.baseOptions;
}
const axiosRequestConfig = { method: 'GET', ...baseOptions, ...options };
const requestHeaderParameter = {};
const requestQueryParameter = {};
// authentication ApiKeyAuth required
await setApiKeyToObject(requestHeaderParameter, "X-Access-Token", this.configuration);
setSearchParams(requestUrlObj, requestQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
axiosRequestConfig.headers = { ...requestHeaderParameter, ...headersFromBaseOptions, ...options.headers };
axiosRequestConfig["url"] = toPathString(requestUrlObj);
axiosRequestConfig["baseURL"] = this.configuration.basePath;
return this.axios.request(axiosRequestConfig);
}
}
GolemioApi.AirQualityV2Api = AirQualityV2Api;
/**
* BicycleCountersV2Api - object-oriented interface
* @export
* @class BicycleCountersV2Api
* @extends {BaseAPI}
*/
class BicycleCountersV2Api extends BaseAPI {
constructor(configuration, axios = globalAxios) {
super(configuration, configuration.basePath, axios);
this.configuration = configuration;
this.axios = axios;
}
/**
*
* @summary GET Bicycle Counters Detections
* @param {BicycleCountersV2ApiV2BicyclecountersDetectionsGetQueryParams} queryParams Query parameters.
* @param {AxiosRequestConfig} [options] Override http request option.
* @throws {RequiredError}
* @memberof BicycleCountersV2Api
*/
async v2BicyclecountersDetectionsGet(queryParams = {}, headerParams = {}, options = {}) {
const localVarPath = `/v2/bicyclecounters/detections`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const requestUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (this.configuration) {
baseOptions = this.configuration.baseOptions;
}
const axiosRequestConfig = { method: 'GET', ...baseOptions, ...options };
const requestHeaderParameter = {};
const requestQueryParameter = {};
// authentication ApiKeyAuth required
await setApiKeyToObject(requestHeaderParameter, "X-Access-Token", this.configuration);
if (queryParams.limit !== undefined) {
requestQueryParameter['limit'] = queryParams.limit;
}
if (queryParams.offset !== undefined) {
requestQueryParameter['offset'] = queryParams.offset;
}
if (queryParams.from !== undefined) {
requestQueryParameter['from'] = queryParams.from;
}
if (queryParams.to !== undefined) {
requestQueryParameter['to'] = queryParams.to;
}
if (queryParams.aggregate !== undefined) {
requestQueryParameter['aggregate'] = queryParams.aggregate;
}
if (queryParams.id !== undefined) {
requestQueryParameter['id'] = queryParams.id;
}
if (headerParams.xAccessToken != null) {
requestHeaderParameter['x-access-token'] = String(headerParams.xAccessToken);
}
setSearchParams(requestUrlObj, requestQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
axiosRequestConfig.headers = { ...requestHeaderParameter, ...headersFromBaseOptions, ...options.headers };
axiosRequestConfig["url"] = toPathString(requestUrlObj);
axiosRequestConfig["baseURL"] = this.configuration.basePath;
return this.axios.request(axiosRequestConfig);
}
/**
*
* @summary GET All Bicycle Counters
* @param {BicycleCountersV2ApiV2BicyclecountersGetQueryParams} queryParams Query parameters.
* @param {AxiosRequestConfig} [options] Override http request option.
* @throws {RequiredError}
* @memberof BicycleCountersV2Api
*/
async v2BicyclecountersGet(queryParams = {}, headerParams = {}, options = {}) {
const localVarPath = `/v2/bicyclecounters`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const requestUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (this.configuration) {
baseOptions = this.configuration.baseOptions;
}
const axiosRequestConfig = { method: 'GET', ...baseOptions, ...options };
const requestHeaderParameter = {};
const requestQueryParameter = {};
// authentication ApiKeyAuth required
await setApiKeyToObject(requestHeaderParameter, "X-Access-Token", this.configuration);
if (queryParams.latlng !== undefined) {
requestQueryParameter['latlng'] = queryParams.latlng;
}
if (queryParams.range !== undefined) {
requestQueryParameter['range'] = queryParams.range;
}
if (queryParams.limit !== undefined) {
requestQueryParameter['limit'] = queryParams.limit;
}
if (queryParams.offset !== undefined) {
requestQueryParameter['offset'] = queryParams.offset;
}
if (headerParams.xAccessToken != null) {
requestHeaderParameter['x-access-token'] = String(headerParams.xAccessToken);
}
setSearchParams(requestUrlObj, requestQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
axiosRequestConfig.headers = { ...requestHeaderParameter, ...headersFromBaseOptions, ...options.headers };
axiosRequestConfig["url"] = toPathString(requestUrlObj);
axiosRequestConfig["baseURL"] = this.configuration.basePath;
return this.axios.request(axiosRequestConfig);
}
/**
*
* @summary GET Bicycle Counters Temperatures
* @param {BicycleCountersV2ApiV2BicyclecountersTemperaturesGetQueryParams} queryParams Query parameters.
* @param {AxiosRequestConfig} [options] Override http request option.
* @throws {RequiredError}
* @memberof BicycleCountersV2Api
*/
async v2BicyclecountersTemperaturesGet(queryParams = {}, headerParams = {}, options = {}) {
const localVarPath = `/v2/bicyclecounters/temperatures`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const requestUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (this.configuration) {
baseOptions = this.configuration.baseOptions;
}
const axiosRequestConfig = { method: 'GET', ...baseOptions, ...options };
const requestHeaderParameter = {};
const requestQueryParameter = {};
// authentication ApiKeyAuth required
await setApiKeyToObject(requestHeaderParameter, "X-Access-Token", this.configuration);
if (queryParams.limit !== undefined) {
requestQueryParameter['limit'] = queryParams.limit;
}
if (queryParams.offset !== undefined) {
requestQueryParameter['offset'] = queryParams.offset;
}
if (queryParams.from !== undefined) {
requestQueryParameter['from'] = queryParams.from;
}
if (queryParams.to !== undefined) {
requestQueryParameter['to'] = queryParams.to;
}
if (queryParams.aggregate !== undefined) {
requestQueryParameter['aggregate'] = queryParams.aggregate;
}
if (queryParams.id) {
requestQueryParameter['id'] = queryParams.id;
}
if (headerParams.xAccessToken != null) {
requestHeaderParameter['x-access-token'] = String(headerParams.xAccessToken);
}
setSearchParams(requestUrlObj, requestQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
axiosRequestConfig.headers = { ...requestHeaderParameter, ...headersFromBaseOptions, ...options.headers };
axiosRequestConfig["url"] = toPathString(requestUrlObj);
axiosRequestConfig["baseURL"] = this.configuration.basePath;
return this.axios.request(axiosRequestConfig);
}
}
GolemioApi.BicycleCountersV2Api = BicycleCountersV2Api;
/**
* BulkyWasteV1Api - object-oriented interface
* @export
* @class BulkyWasteV1Api
* @extends {BaseAPI}
*/
class BulkyWasteV1Api extends BaseAPI {
constructor(configuration, axios = globalAxios) {
super(configuration, configuration.basePath, axios);
this.configuration = configuration;
this.axios = axios;
}
/**
* Provides position of the bulky containers
* @summary GET All Bulky Waste Containers
* @param {BulkyWasteV1ApiGetBWStationsQueryParams} queryParams Query parameters.
* @param {AxiosRequestConfig} [options] Override http request option.
* @throws {RequiredError}
* @memberof BulkyWasteV1Api
*/
async getBWStations(queryParams = {}, options = {}) {
const localVarPath = `/v1/bulky-waste/stations`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const requestUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (this.configuration) {
baseOptions = this.configuration.baseOptions;
}
const axiosRequestConfig = { method: 'GET', ...baseOptions, ...options };
const requestHeaderParameter = {};
const requestQueryParameter = {};
// authentication ApiKeyAuth required
await setApiKeyToObject(requestHeaderParameter, "X-Access-Token", this.configuration);
if (queryParams.latlng !== undefined) {
requestQueryParameter['latlng'] = queryParams.latlng;
}
if (queryParams.range !== undefined) {
requestQueryParameter['range'] = queryParams.range;
}
if (queryParams.from !== undefined) {
requestQueryParameter['from'] = queryParams.from;
}
if (queryParams.to !== undefined) {
requestQueryParameter['to'] = queryParams.to;
}
if (queryParams.districts !== undefined) {
requestQueryParameter['districts'] = queryParams.districts;
}
if (queryParams.limit !== undefined) {
requestQueryParameter['limit'] = queryParams.limit;
}
if (queryParams.offset !== undefined) {
requestQueryParameter['offset'] = queryParams.offset;
}
setSearchParams(requestUrlObj, requestQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
axiosRequestConfig.headers = { ...requestHeaderParameter, ...headersFromBaseOptions, ...options.headers };
axiosRequestConfig["url"] = toPathString(requestUrlObj);
axiosRequestConfig["baseURL"] = this.configuration.basePath;
return this.axios.request(axiosRequestConfig);
}
/**
*
* @summary GET Bulky Waste Station by customId
* @param {string} customId Custom id (in form of pick_date pick_time_from ID:id)
* @param {AxiosRequestConfig} [options] Override http request option.
* @throws {RequiredError}
* @memberof BulkyWasteV1Api
*/
async v1BulkyWasteStationsCustomIdGet(customId, options = {}) {
// verify required parameter 'customId' is not null or undefined
assertParamExists('v1BulkyWasteStationsCustomIdGet', 'customId', customId);
const localVarPath = `/v1/bulky-waste/stations/:customId`
.replace(`{${"customId"}}`, encodeURIComponent(String(customId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const requestUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (this.configuration) {
baseOptions = this.configuration.baseOptions;
}
const axiosRequestConfig = { method: 'GET', ...baseOptions, ...options };
const requestHeaderParameter = {};
const requestQueryParameter = {};
// authentication ApiKeyAuth required
await setApiKeyToObject(requestHeaderParameter, "X-Access-Token", this.configuration);
setSearchParams(requestUrlObj, requestQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
axiosRequestConfig.headers = { ...requestHeaderParameter, ...headersFromBaseOptions, ...options.headers };
axiosRequestConfig["url"] = toPathString(requestUrlObj);
axiosRequestConfig["baseURL"] = this.configuration.basePath;
return this.axios.request(axiosRequestConfig);
}
}
GolemioApi.BulkyWasteV1Api = BulkyWasteV1Api;
/**
* EnergeticsV2Api - object-oriented interface
* @export
* @class EnergeticsV2Api
* @extends {BaseAPI}
*/
class EnergeticsV2Api extends BaseAPI {
constructor(configuration, axios = globalAxios) {
super(configuration, configuration.basePath, axios);
this.configuration = configuration;
this.axios = axios;
}
/**
*
* @summary Get all buildings
* @param {EnergeticsV2ApiV2EnergeticsBuildingsGetQueryParams} queryParams Query parameters.
* @param {AxiosRequestConfig} [options] Override http request option.
* @throws {RequiredError}
* @memberof EnergeticsV2Api
*/
async v2EnergeticsBuildingsGet(queryParams = {}, options = {}) {
const localVarPath = `/v2/energetics/buildings`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const requestUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (this.configuration) {
baseOptions = this.configuration.baseOptions;
}
const axiosRequestConfig = { method: 'GET', ...baseOptions, ...options };
const requestHeaderParameter = {};
const requestQueryParameter = {};
// authentication ApiKeyAuth required
await setApiKeyToObject(requestHeaderParameter, "X-Access-Token", this.configuration);
if (queryParams.full !== undefined) {
requestQueryParameter['full'] = queryParams.full;
}
setSearchParams(requestUrlObj, requestQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
axiosRequestConfig.headers = { ...requestHeaderParameter, ...headersFromBaseOptions, ...options.headers };
axiosRequestConfig["url"] = toPathString(requestUrlObj);
axiosRequestConfig["baseURL"] = this.configuration.basePath;
return this.axios.request(axiosRequestConfig);
}
/**
*
* @summary Get a building by ID
* @param {number} id
* @param {AxiosRequestConfig} [options] Override http request option.
* @throws {RequiredError}
* @memberof EnergeticsV2Api
*/
async v2EnergeticsBuildingsIdGet(id, options = {}) {
// verify required parameter 'id' is not null or undefined
assertParamExists('v2EnergeticsBuildingsIdGet', 'id', id);
const localVarPath = `/v2/energetics/buildings/{id}`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const requestUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (this.configuration) {
baseOptions = this.configuration.baseOptions;
}
const axiosRequestConfig = { method: 'GET', ...baseOptions, ...options };
const requestHeaderParameter = {};
const requestQueryParameter = {};
// authentication ApiKeyAuth required
await setApiKeyToObject(requestHeaderParameter, "X-Access-Token", this.configuration);
setSearchParams(requestUrlObj, requestQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
axiosRequestConfig.headers = { ...requestHeaderParameter, ...headersFromBaseOptions, ...options.headers };
axiosRequestConfig["url"] = toPathString(requestUrlObj);
axiosRequestConfig["baseURL"] = this.configuration.basePath;
return this.axios.request(axiosRequestConfig);
}
/**
*
* @summary Measurement device info
* @param {number} deviceId Id of device
* @param {AxiosRequestConfig} [options] Override http request option.
* @throws {RequiredError}
* @memberof EnergeticsV2Api
*/
async v2EnergeticsDevicesDeviceIdGet(deviceId, options = {}) {
// verify required parameter 'deviceId' is not null or undefined
assertParamExists('v2EnergeticsDevicesDeviceIdGet', 'deviceId', deviceId);
const localVarPath = `/v2/energetics/devices/{deviceId}`
.replace(`{${"deviceId"}}`, encodeURIComponent(String(deviceId)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const requestUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (this.configuration) {
baseOptions = this.configuration.baseOptions;
}
const axiosRequestConfig = { method: 'GET', ...baseOptions, ...options };
const requestHeaderParameter = {};
const requestQueryParameter = {};
// authentication ApiKeyAuth required
await setApiKeyToObject(requestHeaderParameter, "X-Access-Token", this.configuration);
setSearchParams(requestUrlObj, requestQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
axiosRequestConfig.headers = { ...requestHeaderParameter, ...headersFromBaseOptions, ...options.headers };
axiosRequestConfig["url"] = toPathString(requestUrlObj);
axiosRequestConfig["baseURL"] = this.configuration.basePath;
return this.axios.request(axiosRequestConfig);
}
/**
*
* @summary List of measurement devices
* @param {AxiosRequestConfig} [options] Override http request option.
* @throws {RequiredError}
* @memberof EnergeticsV2Api
*/
async v2EnergeticsDevicesGet(options = {}) {
const localVarPath = `/v2/energetics/devices`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const requestUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (this.configuration) {
baseOptions = this.configuration.baseOptions;
}
const axiosRequestConfig = { method: 'GET', ...baseOptions, ...options };
const requestHeaderParameter = {};
const requestQueryParameter = {};
// authentication ApiKeyAuth required
await setApiKeyToObject(requestHeaderParameter, "X-Access-Token", this.configuration);
setSearchParams(requestUrlObj, requestQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
axiosRequestConfig.headers = { ...requestHeaderParameter, ...headersFromBaseOptions, ...options.headers };
axiosRequestConfig["url"] = toPathString(requestUrlObj);
axiosRequestConfig["baseURL"] = this.configuration.basePath;
return this.axios.request(axiosRequestConfig);
}
/**
*
* @summary Measurements
* @param {EnergeticsV2ApiV2EnergeticsMeasurementsGetQueryParams} queryParams Query parameters.
* @param {AxiosRequestConfig} [options] Override http request option.
* @throws {RequiredError}
* @memberof EnergeticsV2Api
*/
async v2EnergeticsMeasurementsGet(queryParams = {}, options = {}) {
const localVarPath = `/v2/energetics/measurements`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const requestUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (this.configuration) {
baseOptions = this.configuration.baseOptions;
}
const axiosRequestConfig = { method: 'GET', ...baseOptions, ...options };
const requestHeaderParameter = {};
const requestQueryParameter = {};
// authentication ApiKeyAuth required
await setApiKeyToObject(requestHeaderParameter, "X-Access-Token", this.configuration);
if (queryParams.variable !== undefined) {
requestQueryParameter['variable'] = queryParams.variable;
}
if (queryParams.type !== undefined) {
requestQueryParameter['type'] = queryParams.type;
}
if (queryParams.addr1 !== undefined) {
requestQueryParameter['addr1'] = queryParams.addr1;
}
if (queryParams.addr2 !== undefined) {
requestQueryParameter['addr2'] = queryParams.addr2;
}
if (queryParams.dateFrom !== undefined) {
requestQueryParameter['dateFrom'] = (queryParams.dateFrom instanceof Date) ?
queryParams.dateFrom.toISOString() :
queryParams.dateFrom;
}
if (queryParams.dateTo !== undefined) {
requestQueryParameter['dateTo'] = (queryParams.dateTo instanceof Date) ?
queryParams.dateTo.toISOString() :
queryParams.dateTo;
}
if (queryParams.limit !== undefined) {
requestQueryParameter['limit'] = queryParams.limit;
}
if (queryParams.offset !== undefined) {
requestQueryParameter['offset'] = queryParams.offset;
}
setSearchParams(requestUrlObj, requestQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
axiosRequestConfig.headers = { ...requestHeaderParameter, ...headersFromBaseOptions, ...options.headers };
axiosRequestConfig["url"] = toPathString(requestUrlObj);
axiosRequestConfig["baseURL"] = this.configuration.basePath;
return this.axios.request(axiosRequestConfig);
}
/**
*
* @summary Monthly sums of measurements from devices
* @param {EnergeticsV2ApiV2EnergeticsMeasurementsMonthlyReadingGetQueryParams} queryParams Query parameters.
* @param {AxiosRequestConfig} [options] Override http request option.
* @throws {RequiredError}
* @memberof EnergeticsV2Api
*/
async v2EnergeticsMeasurementsMonthlyReadingGet(queryParams, options = {}) {
// verify required parameter 'addr1' is not null or undefined
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'addr1', queryParams.addr1);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'addr2', queryParams.addr2);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'variable', queryParams.variable);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'year', queryParams.year);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'month', queryParams.month);
// verify required parameter 'addr2' is not null or undefined
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'addr1', queryParams.addr1);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'addr2', queryParams.addr2);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'variable', queryParams.variable);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'year', queryParams.year);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'month', queryParams.month);
// verify required parameter 'variable' is not null or undefined
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'addr1', queryParams.addr1);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'addr2', queryParams.addr2);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'variable', queryParams.variable);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'year', queryParams.year);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'month', queryParams.month);
// verify required parameter 'year' is not null or undefined
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'addr1', queryParams.addr1);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'addr2', queryParams.addr2);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'variable', queryParams.variable);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'year', queryParams.year);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'month', queryParams.month);
// verify required parameter 'month' is not null or undefined
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'addr1', queryParams.addr1);
assertParamExists('v2EnergeticsMeasurementsMonthlyReadingGet', 'addr2', queryParams.addr2);
assertParamExists('v2EnergeticsMeasurementsMonthlyRead