eiagov-typescript-fetch-client 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +73 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/apis/AEOApi.ts +415 -0
- package/apis/COALApi.ts +3645 -0
- package/apis/CRUDIMPORTSApi.ts +322 -0
- package/apis/DBFApi.ts +2260 -0
- package/apis/ELECApi.ts +1180 -0
- package/apis/EMISSApi.ts +640 -0
- package/apis/IEOApi.ts +415 -0
- package/apis/INTLApi.ts +322 -0
- package/apis/NGApi.ts +511 -0
- package/apis/NUCSTATUSApi.ts +910 -0
- package/apis/RTOApi.ts +2260 -0
- package/apis/RootApi.ts +66 -0
- package/apis/SEDSApi.ts +322 -0
- package/apis/SEPApi.ts +1990 -0
- package/apis/STEOApi.ts +322 -0
- package/apis/TOTALApi.ts +322 -0
- package/apis/index.ts +18 -0
- package/docs/AEOApi.md +456 -0
- package/docs/COALApi.md +4847 -0
- package/docs/CRUDIMPORTSApi.md +371 -0
- package/docs/DBFApi.md +2976 -0
- package/docs/DataParams.md +48 -0
- package/docs/DataResponse.md +42 -0
- package/docs/DataResponseContainer.md +38 -0
- package/docs/ELECApi.md +1524 -0
- package/docs/EMISSApi.md +798 -0
- package/docs/Facet.md +38 -0
- package/docs/FacetDetails.md +36 -0
- package/docs/FacetDetailsContainer.md +38 -0
- package/docs/FacetMetaData.md +36 -0
- package/docs/FacetOptionList.md +36 -0
- package/docs/FacetOptionListContainer.md +38 -0
- package/docs/FinalRoute.md +52 -0
- package/docs/FinalRouteResponse.md +36 -0
- package/docs/FinalRouteResponseContainer.md +38 -0
- package/docs/Frequency.md +40 -0
- package/docs/IEOApi.md +456 -0
- package/docs/INTLApi.md +371 -0
- package/docs/NGApi.md +541 -0
- package/docs/NUCSTATUSApi.md +1161 -0
- package/docs/RTOApi.md +2976 -0
- package/docs/RootApi.md +70 -0
- package/docs/RouteRequest.md +36 -0
- package/docs/RouteResponse.md +36 -0
- package/docs/RouteResponseContainer.md +38 -0
- package/docs/Routes.md +40 -0
- package/docs/SEDSApi.md +372 -0
- package/docs/SEPApi.md +2613 -0
- package/docs/STEOApi.md +371 -0
- package/docs/Sort.md +36 -0
- package/docs/TOTALApi.md +371 -0
- package/index.ts +5 -0
- package/models/DataParams.ts +129 -0
- package/models/DataResponse.ts +97 -0
- package/models/DataResponseContainer.ts +96 -0
- package/models/Facet.ts +81 -0
- package/models/FacetDetails.ts +81 -0
- package/models/FacetDetailsContainer.ts +96 -0
- package/models/FacetMetaData.ts +73 -0
- package/models/FacetOptionList.ts +73 -0
- package/models/FacetOptionListContainer.ts +96 -0
- package/models/FinalRoute.ts +152 -0
- package/models/FinalRouteResponse.ts +88 -0
- package/models/FinalRouteResponseContainer.ts +96 -0
- package/models/Frequency.ts +89 -0
- package/models/RouteRequest.ts +73 -0
- package/models/RouteResponse.ts +88 -0
- package/models/RouteResponseContainer.ts +96 -0
- package/models/Routes.ts +89 -0
- package/models/Sort.ts +73 -0
- package/models/index.ts +20 -0
- package/package.json +15 -0
- package/runtime.ts +449 -0
package/apis/EMISSApi.ts
ADDED
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* EIA APIv2
|
|
5
|
+
* Swagger UI interface for EIA\'s APIv2. You can also explore EIA\'s API using the [Opendata Query Browser](https://www.eia.gov/opendata/browser/). For this UI, you must use your EIA `api key` to apply filters and return data. You can register for an API Key at [https://www.eia.gov/opendata/](https://www.eia.gov/opendata/)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type DataParams,
|
|
18
|
+
DataParamsFromJSON,
|
|
19
|
+
DataParamsToJSON,
|
|
20
|
+
} from '../models/DataParams';
|
|
21
|
+
import {
|
|
22
|
+
type DataResponseContainer,
|
|
23
|
+
DataResponseContainerFromJSON,
|
|
24
|
+
DataResponseContainerToJSON,
|
|
25
|
+
} from '../models/DataResponseContainer';
|
|
26
|
+
import {
|
|
27
|
+
type FacetDetailsContainer,
|
|
28
|
+
FacetDetailsContainerFromJSON,
|
|
29
|
+
FacetDetailsContainerToJSON,
|
|
30
|
+
} from '../models/FacetDetailsContainer';
|
|
31
|
+
import {
|
|
32
|
+
type FacetOptionListContainer,
|
|
33
|
+
FacetOptionListContainerFromJSON,
|
|
34
|
+
FacetOptionListContainerToJSON,
|
|
35
|
+
} from '../models/FacetOptionListContainer';
|
|
36
|
+
import {
|
|
37
|
+
type FinalRouteResponseContainer,
|
|
38
|
+
FinalRouteResponseContainerFromJSON,
|
|
39
|
+
FinalRouteResponseContainerToJSON,
|
|
40
|
+
} from '../models/FinalRouteResponseContainer';
|
|
41
|
+
import {
|
|
42
|
+
type RouteResponseContainer,
|
|
43
|
+
RouteResponseContainerFromJSON,
|
|
44
|
+
RouteResponseContainerToJSON,
|
|
45
|
+
} from '../models/RouteResponseContainer';
|
|
46
|
+
import {
|
|
47
|
+
type Sort,
|
|
48
|
+
SortFromJSON,
|
|
49
|
+
SortToJSON,
|
|
50
|
+
} from '../models/Sort';
|
|
51
|
+
|
|
52
|
+
export interface V2Co2EmissionsCo2EmissionsAggregatesDataGetRequest {
|
|
53
|
+
data?: Array<string>;
|
|
54
|
+
facets?: object;
|
|
55
|
+
frequency?: string;
|
|
56
|
+
start?: string;
|
|
57
|
+
end?: string;
|
|
58
|
+
sort?: Sort;
|
|
59
|
+
length?: number;
|
|
60
|
+
offset?: number;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface V2Co2EmissionsCo2EmissionsAggregatesDataPostRequest {
|
|
64
|
+
dataParams: DataParams;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface V2Co2EmissionsCo2EmissionsAggregatesFacetFacetIdGetRequest {
|
|
68
|
+
facetId: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface V2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataGetRequest {
|
|
72
|
+
data?: Array<string>;
|
|
73
|
+
facets?: object;
|
|
74
|
+
frequency?: string;
|
|
75
|
+
start?: string;
|
|
76
|
+
end?: string;
|
|
77
|
+
sort?: Sort;
|
|
78
|
+
length?: number;
|
|
79
|
+
offset?: number;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface V2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataPostRequest {
|
|
83
|
+
dataParams: DataParams;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface V2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetFacetIdGetRequest {
|
|
87
|
+
facetId: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
*/
|
|
93
|
+
export class EMISSApi extends runtime.BaseAPI {
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Creates request options for v2Co2EmissionsCo2EmissionsAggregatesDataGet without sending the request
|
|
97
|
+
*/
|
|
98
|
+
async v2Co2EmissionsCo2EmissionsAggregatesDataGetRequestOpts(requestParameters: V2Co2EmissionsCo2EmissionsAggregatesDataGetRequest): Promise<runtime.RequestOpts> {
|
|
99
|
+
const queryParameters: any = {};
|
|
100
|
+
|
|
101
|
+
if (requestParameters['data'] != null) {
|
|
102
|
+
queryParameters['data'] = requestParameters['data'];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (requestParameters['facets'] != null) {
|
|
106
|
+
queryParameters['facets'] = requestParameters['facets'];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (requestParameters['frequency'] != null) {
|
|
110
|
+
queryParameters['frequency'] = requestParameters['frequency'];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (requestParameters['start'] != null) {
|
|
114
|
+
queryParameters['start'] = requestParameters['start'];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (requestParameters['end'] != null) {
|
|
118
|
+
queryParameters['end'] = requestParameters['end'];
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (requestParameters['sort'] != null) {
|
|
122
|
+
queryParameters['sort'] = requestParameters['sort'];
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (requestParameters['length'] != null) {
|
|
126
|
+
queryParameters['length'] = requestParameters['length'];
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (requestParameters['offset'] != null) {
|
|
130
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
134
|
+
|
|
135
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
136
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
let urlPath = `/v2/co2-emissions/co2-emissions-aggregates/data`;
|
|
141
|
+
|
|
142
|
+
return {
|
|
143
|
+
path: urlPath,
|
|
144
|
+
method: 'GET',
|
|
145
|
+
headers: headerParameters,
|
|
146
|
+
query: queryParameters,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* API data with query params
|
|
152
|
+
*/
|
|
153
|
+
async v2Co2EmissionsCo2EmissionsAggregatesDataGetRaw(requestParameters: V2Co2EmissionsCo2EmissionsAggregatesDataGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataResponseContainer>> {
|
|
154
|
+
const requestOptions = await this.v2Co2EmissionsCo2EmissionsAggregatesDataGetRequestOpts(requestParameters);
|
|
155
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
156
|
+
|
|
157
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DataResponseContainerFromJSON(jsonValue));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* API data with query params
|
|
162
|
+
*/
|
|
163
|
+
async v2Co2EmissionsCo2EmissionsAggregatesDataGet(requestParameters: V2Co2EmissionsCo2EmissionsAggregatesDataGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataResponseContainer> {
|
|
164
|
+
const response = await this.v2Co2EmissionsCo2EmissionsAggregatesDataGetRaw(requestParameters, initOverrides);
|
|
165
|
+
return await response.value();
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Creates request options for v2Co2EmissionsCo2EmissionsAggregatesDataPost without sending the request
|
|
170
|
+
*/
|
|
171
|
+
async v2Co2EmissionsCo2EmissionsAggregatesDataPostRequestOpts(requestParameters: V2Co2EmissionsCo2EmissionsAggregatesDataPostRequest): Promise<runtime.RequestOpts> {
|
|
172
|
+
if (requestParameters['dataParams'] == null) {
|
|
173
|
+
throw new runtime.RequiredError(
|
|
174
|
+
'dataParams',
|
|
175
|
+
'Required parameter "dataParams" was null or undefined when calling v2Co2EmissionsCo2EmissionsAggregatesDataPost().'
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const queryParameters: any = {};
|
|
180
|
+
|
|
181
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
182
|
+
|
|
183
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
184
|
+
|
|
185
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
186
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
let urlPath = `/v2/co2-emissions/co2-emissions-aggregates/data`;
|
|
191
|
+
|
|
192
|
+
return {
|
|
193
|
+
path: urlPath,
|
|
194
|
+
method: 'POST',
|
|
195
|
+
headers: headerParameters,
|
|
196
|
+
query: queryParameters,
|
|
197
|
+
body: DataParamsToJSON(requestParameters['dataParams']),
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Class CO2EmissionsAggregatesController CO2 Emissions Aggregates data set controller.
|
|
203
|
+
* Return co2-emissions-aggregates Data
|
|
204
|
+
*/
|
|
205
|
+
async v2Co2EmissionsCo2EmissionsAggregatesDataPostRaw(requestParameters: V2Co2EmissionsCo2EmissionsAggregatesDataPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataResponseContainer>> {
|
|
206
|
+
const requestOptions = await this.v2Co2EmissionsCo2EmissionsAggregatesDataPostRequestOpts(requestParameters);
|
|
207
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
208
|
+
|
|
209
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DataResponseContainerFromJSON(jsonValue));
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Class CO2EmissionsAggregatesController CO2 Emissions Aggregates data set controller.
|
|
214
|
+
* Return co2-emissions-aggregates Data
|
|
215
|
+
*/
|
|
216
|
+
async v2Co2EmissionsCo2EmissionsAggregatesDataPost(requestParameters: V2Co2EmissionsCo2EmissionsAggregatesDataPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataResponseContainer> {
|
|
217
|
+
const response = await this.v2Co2EmissionsCo2EmissionsAggregatesDataPostRaw(requestParameters, initOverrides);
|
|
218
|
+
return await response.value();
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Creates request options for v2Co2EmissionsCo2EmissionsAggregatesFacetFacetIdGet without sending the request
|
|
223
|
+
*/
|
|
224
|
+
async v2Co2EmissionsCo2EmissionsAggregatesFacetFacetIdGetRequestOpts(requestParameters: V2Co2EmissionsCo2EmissionsAggregatesFacetFacetIdGetRequest): Promise<runtime.RequestOpts> {
|
|
225
|
+
if (requestParameters['facetId'] == null) {
|
|
226
|
+
throw new runtime.RequiredError(
|
|
227
|
+
'facetId',
|
|
228
|
+
'Required parameter "facetId" was null or undefined when calling v2Co2EmissionsCo2EmissionsAggregatesFacetFacetIdGet().'
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const queryParameters: any = {};
|
|
233
|
+
|
|
234
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
235
|
+
|
|
236
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
237
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
let urlPath = `/v2/co2-emissions/co2-emissions-aggregates/facet/{facet_id}`;
|
|
242
|
+
urlPath = urlPath.replace('{facet_id}', encodeURIComponent(String(requestParameters['facetId'])));
|
|
243
|
+
|
|
244
|
+
return {
|
|
245
|
+
path: urlPath,
|
|
246
|
+
method: 'GET',
|
|
247
|
+
headers: headerParameters,
|
|
248
|
+
query: queryParameters,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
*/
|
|
254
|
+
async v2Co2EmissionsCo2EmissionsAggregatesFacetFacetIdGetRaw(requestParameters: V2Co2EmissionsCo2EmissionsAggregatesFacetFacetIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FacetDetailsContainer>> {
|
|
255
|
+
const requestOptions = await this.v2Co2EmissionsCo2EmissionsAggregatesFacetFacetIdGetRequestOpts(requestParameters);
|
|
256
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
257
|
+
|
|
258
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FacetDetailsContainerFromJSON(jsonValue));
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
*/
|
|
263
|
+
async v2Co2EmissionsCo2EmissionsAggregatesFacetFacetIdGet(requestParameters: V2Co2EmissionsCo2EmissionsAggregatesFacetFacetIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FacetDetailsContainer> {
|
|
264
|
+
const response = await this.v2Co2EmissionsCo2EmissionsAggregatesFacetFacetIdGetRaw(requestParameters, initOverrides);
|
|
265
|
+
return await response.value();
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Creates request options for v2Co2EmissionsCo2EmissionsAggregatesFacetGet without sending the request
|
|
270
|
+
*/
|
|
271
|
+
async v2Co2EmissionsCo2EmissionsAggregatesFacetGetRequestOpts(): Promise<runtime.RequestOpts> {
|
|
272
|
+
const queryParameters: any = {};
|
|
273
|
+
|
|
274
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
275
|
+
|
|
276
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
277
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
let urlPath = `/v2/co2-emissions/co2-emissions-aggregates/facet`;
|
|
282
|
+
|
|
283
|
+
return {
|
|
284
|
+
path: urlPath,
|
|
285
|
+
method: 'GET',
|
|
286
|
+
headers: headerParameters,
|
|
287
|
+
query: queryParameters,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
*/
|
|
293
|
+
async v2Co2EmissionsCo2EmissionsAggregatesFacetGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FacetOptionListContainer>> {
|
|
294
|
+
const requestOptions = await this.v2Co2EmissionsCo2EmissionsAggregatesFacetGetRequestOpts();
|
|
295
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
296
|
+
|
|
297
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FacetOptionListContainerFromJSON(jsonValue));
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
*/
|
|
302
|
+
async v2Co2EmissionsCo2EmissionsAggregatesFacetGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FacetOptionListContainer> {
|
|
303
|
+
const response = await this.v2Co2EmissionsCo2EmissionsAggregatesFacetGetRaw(initOverrides);
|
|
304
|
+
return await response.value();
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Creates request options for v2Co2EmissionsCo2EmissionsAggregatesGet without sending the request
|
|
309
|
+
*/
|
|
310
|
+
async v2Co2EmissionsCo2EmissionsAggregatesGetRequestOpts(): Promise<runtime.RequestOpts> {
|
|
311
|
+
const queryParameters: any = {};
|
|
312
|
+
|
|
313
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
314
|
+
|
|
315
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
316
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
let urlPath = `/v2/co2-emissions/co2-emissions-aggregates`;
|
|
321
|
+
|
|
322
|
+
return {
|
|
323
|
+
path: urlPath,
|
|
324
|
+
method: 'GET',
|
|
325
|
+
headers: headerParameters,
|
|
326
|
+
query: queryParameters,
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
*/
|
|
332
|
+
async v2Co2EmissionsCo2EmissionsAggregatesGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FinalRouteResponseContainer>> {
|
|
333
|
+
const requestOptions = await this.v2Co2EmissionsCo2EmissionsAggregatesGetRequestOpts();
|
|
334
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
335
|
+
|
|
336
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FinalRouteResponseContainerFromJSON(jsonValue));
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
*/
|
|
341
|
+
async v2Co2EmissionsCo2EmissionsAggregatesGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FinalRouteResponseContainer> {
|
|
342
|
+
const response = await this.v2Co2EmissionsCo2EmissionsAggregatesGetRaw(initOverrides);
|
|
343
|
+
return await response.value();
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Creates request options for v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataGet without sending the request
|
|
348
|
+
*/
|
|
349
|
+
async v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataGetRequestOpts(requestParameters: V2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataGetRequest): Promise<runtime.RequestOpts> {
|
|
350
|
+
const queryParameters: any = {};
|
|
351
|
+
|
|
352
|
+
if (requestParameters['data'] != null) {
|
|
353
|
+
queryParameters['data'] = requestParameters['data'];
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
if (requestParameters['facets'] != null) {
|
|
357
|
+
queryParameters['facets'] = requestParameters['facets'];
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
if (requestParameters['frequency'] != null) {
|
|
361
|
+
queryParameters['frequency'] = requestParameters['frequency'];
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
if (requestParameters['start'] != null) {
|
|
365
|
+
queryParameters['start'] = requestParameters['start'];
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
if (requestParameters['end'] != null) {
|
|
369
|
+
queryParameters['end'] = requestParameters['end'];
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
if (requestParameters['sort'] != null) {
|
|
373
|
+
queryParameters['sort'] = requestParameters['sort'];
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
if (requestParameters['length'] != null) {
|
|
377
|
+
queryParameters['length'] = requestParameters['length'];
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
if (requestParameters['offset'] != null) {
|
|
381
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
385
|
+
|
|
386
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
387
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
let urlPath = `/v2/co2-emissions/co2-emissions-and-carbon-coefficients/data`;
|
|
392
|
+
|
|
393
|
+
return {
|
|
394
|
+
path: urlPath,
|
|
395
|
+
method: 'GET',
|
|
396
|
+
headers: headerParameters,
|
|
397
|
+
query: queryParameters,
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* API data with query params
|
|
403
|
+
*/
|
|
404
|
+
async v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataGetRaw(requestParameters: V2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataResponseContainer>> {
|
|
405
|
+
const requestOptions = await this.v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataGetRequestOpts(requestParameters);
|
|
406
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
407
|
+
|
|
408
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DataResponseContainerFromJSON(jsonValue));
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* API data with query params
|
|
413
|
+
*/
|
|
414
|
+
async v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataGet(requestParameters: V2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataResponseContainer> {
|
|
415
|
+
const response = await this.v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataGetRaw(requestParameters, initOverrides);
|
|
416
|
+
return await response.value();
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Creates request options for v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataPost without sending the request
|
|
421
|
+
*/
|
|
422
|
+
async v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataPostRequestOpts(requestParameters: V2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataPostRequest): Promise<runtime.RequestOpts> {
|
|
423
|
+
if (requestParameters['dataParams'] == null) {
|
|
424
|
+
throw new runtime.RequiredError(
|
|
425
|
+
'dataParams',
|
|
426
|
+
'Required parameter "dataParams" was null or undefined when calling v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataPost().'
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
const queryParameters: any = {};
|
|
431
|
+
|
|
432
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
433
|
+
|
|
434
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
435
|
+
|
|
436
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
437
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
let urlPath = `/v2/co2-emissions/co2-emissions-and-carbon-coefficients/data`;
|
|
442
|
+
|
|
443
|
+
return {
|
|
444
|
+
path: urlPath,
|
|
445
|
+
method: 'POST',
|
|
446
|
+
headers: headerParameters,
|
|
447
|
+
query: queryParameters,
|
|
448
|
+
body: DataParamsToJSON(requestParameters['dataParams']),
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Class CO2EmissionsAndCarbonCoefficientsController CO2 Emissions Aggregates data set controller.
|
|
454
|
+
* Return co2-emissions-and-carbon-coefficients Data
|
|
455
|
+
*/
|
|
456
|
+
async v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataPostRaw(requestParameters: V2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DataResponseContainer>> {
|
|
457
|
+
const requestOptions = await this.v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataPostRequestOpts(requestParameters);
|
|
458
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
459
|
+
|
|
460
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DataResponseContainerFromJSON(jsonValue));
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Class CO2EmissionsAndCarbonCoefficientsController CO2 Emissions Aggregates data set controller.
|
|
465
|
+
* Return co2-emissions-and-carbon-coefficients Data
|
|
466
|
+
*/
|
|
467
|
+
async v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataPost(requestParameters: V2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DataResponseContainer> {
|
|
468
|
+
const response = await this.v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsDataPostRaw(requestParameters, initOverrides);
|
|
469
|
+
return await response.value();
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Creates request options for v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetFacetIdGet without sending the request
|
|
474
|
+
*/
|
|
475
|
+
async v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetFacetIdGetRequestOpts(requestParameters: V2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetFacetIdGetRequest): Promise<runtime.RequestOpts> {
|
|
476
|
+
if (requestParameters['facetId'] == null) {
|
|
477
|
+
throw new runtime.RequiredError(
|
|
478
|
+
'facetId',
|
|
479
|
+
'Required parameter "facetId" was null or undefined when calling v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetFacetIdGet().'
|
|
480
|
+
);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
const queryParameters: any = {};
|
|
484
|
+
|
|
485
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
486
|
+
|
|
487
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
488
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
let urlPath = `/v2/co2-emissions/co2-emissions-and-carbon-coefficients/facet/{facet_id}`;
|
|
493
|
+
urlPath = urlPath.replace('{facet_id}', encodeURIComponent(String(requestParameters['facetId'])));
|
|
494
|
+
|
|
495
|
+
return {
|
|
496
|
+
path: urlPath,
|
|
497
|
+
method: 'GET',
|
|
498
|
+
headers: headerParameters,
|
|
499
|
+
query: queryParameters,
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
*/
|
|
505
|
+
async v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetFacetIdGetRaw(requestParameters: V2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetFacetIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FacetDetailsContainer>> {
|
|
506
|
+
const requestOptions = await this.v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetFacetIdGetRequestOpts(requestParameters);
|
|
507
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
508
|
+
|
|
509
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FacetDetailsContainerFromJSON(jsonValue));
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
*/
|
|
514
|
+
async v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetFacetIdGet(requestParameters: V2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetFacetIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FacetDetailsContainer> {
|
|
515
|
+
const response = await this.v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetFacetIdGetRaw(requestParameters, initOverrides);
|
|
516
|
+
return await response.value();
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Creates request options for v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetGet without sending the request
|
|
521
|
+
*/
|
|
522
|
+
async v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetGetRequestOpts(): Promise<runtime.RequestOpts> {
|
|
523
|
+
const queryParameters: any = {};
|
|
524
|
+
|
|
525
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
526
|
+
|
|
527
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
528
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
let urlPath = `/v2/co2-emissions/co2-emissions-and-carbon-coefficients/facet`;
|
|
533
|
+
|
|
534
|
+
return {
|
|
535
|
+
path: urlPath,
|
|
536
|
+
method: 'GET',
|
|
537
|
+
headers: headerParameters,
|
|
538
|
+
query: queryParameters,
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
*/
|
|
544
|
+
async v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FacetOptionListContainer>> {
|
|
545
|
+
const requestOptions = await this.v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetGetRequestOpts();
|
|
546
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
547
|
+
|
|
548
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FacetOptionListContainerFromJSON(jsonValue));
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
*/
|
|
553
|
+
async v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FacetOptionListContainer> {
|
|
554
|
+
const response = await this.v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsFacetGetRaw(initOverrides);
|
|
555
|
+
return await response.value();
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Creates request options for v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsGet without sending the request
|
|
560
|
+
*/
|
|
561
|
+
async v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsGetRequestOpts(): Promise<runtime.RequestOpts> {
|
|
562
|
+
const queryParameters: any = {};
|
|
563
|
+
|
|
564
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
565
|
+
|
|
566
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
567
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
let urlPath = `/v2/co2-emissions/co2-emissions-and-carbon-coefficients`;
|
|
572
|
+
|
|
573
|
+
return {
|
|
574
|
+
path: urlPath,
|
|
575
|
+
method: 'GET',
|
|
576
|
+
headers: headerParameters,
|
|
577
|
+
query: queryParameters,
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
*/
|
|
583
|
+
async v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FinalRouteResponseContainer>> {
|
|
584
|
+
const requestOptions = await this.v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsGetRequestOpts();
|
|
585
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
586
|
+
|
|
587
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FinalRouteResponseContainerFromJSON(jsonValue));
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
*/
|
|
592
|
+
async v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FinalRouteResponseContainer> {
|
|
593
|
+
const response = await this.v2Co2EmissionsCo2EmissionsAndCarbonCoefficientsGetRaw(initOverrides);
|
|
594
|
+
return await response.value();
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* Creates request options for v2Co2EmissionsGet without sending the request
|
|
599
|
+
*/
|
|
600
|
+
async v2Co2EmissionsGetRequestOpts(): Promise<runtime.RequestOpts> {
|
|
601
|
+
const queryParameters: any = {};
|
|
602
|
+
|
|
603
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
604
|
+
|
|
605
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
606
|
+
queryParameters["api_key"] = await this.configuration.apiKey("api_key"); // api_key authentication
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
let urlPath = `/v2/co2-emissions`;
|
|
611
|
+
|
|
612
|
+
return {
|
|
613
|
+
path: urlPath,
|
|
614
|
+
method: 'GET',
|
|
615
|
+
headers: headerParameters,
|
|
616
|
+
query: queryParameters,
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* CO2 Emissions data set top-level controller.
|
|
622
|
+
* Class CO2EmissionsController
|
|
623
|
+
*/
|
|
624
|
+
async v2Co2EmissionsGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RouteResponseContainer>> {
|
|
625
|
+
const requestOptions = await this.v2Co2EmissionsGetRequestOpts();
|
|
626
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
627
|
+
|
|
628
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RouteResponseContainerFromJSON(jsonValue));
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* CO2 Emissions data set top-level controller.
|
|
633
|
+
* Class CO2EmissionsController
|
|
634
|
+
*/
|
|
635
|
+
async v2Co2EmissionsGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RouteResponseContainer> {
|
|
636
|
+
const response = await this.v2Co2EmissionsGetRaw(initOverrides);
|
|
637
|
+
return await response.value();
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
}
|