@googleapis/travelimpactmodel 1.0.0 → 1.0.1
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/CHANGELOG.md +7 -0
- package/build/v1.d.ts +0 -48
- package/build/v1.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +0 -48
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/travelimpactmodel-v1.0.0...travelimpactmodel-v1.0.1) (2023-08-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **travelimpactmodel:** update the API ([75a5352](https://github.com/googleapis/google-api-nodejs-client/commit/75a53526311c82b6990ca3d30dd7803ff266149d))
|
|
9
|
+
|
|
3
10
|
## 1.0.0 (2022-12-22)
|
|
4
11
|
|
|
5
12
|
|
package/build/v1.d.ts
CHANGED
|
@@ -195,54 +195,6 @@ export declare namespace travelimpactmodel_v1 {
|
|
|
195
195
|
constructor(context: APIRequestContext);
|
|
196
196
|
/**
|
|
197
197
|
* Stateless method to retrieve emission estimates. Details on how emission estimates are computed: https://github.com/google/travel-impact-model The response will contain all entries that match the input flight legs, in the same order. If there are no estimates available for a certain flight leg, the response will return the flight leg object with empty emission fields. The request will still be considered successful. Reasons for missing emission estimates include: - The flight is unknown to the server. - The input flight leg is missing one or more identifiers. - The flight date is in the past. - The aircraft type is not supported by the model. - Missing seat configuration. The request can contain up to 1000 flight legs. If the request has more than 1000 direct flights, if will fail with an INVALID_ARGUMENT error.
|
|
198
|
-
* @example
|
|
199
|
-
* ```js
|
|
200
|
-
* // Before running the sample:
|
|
201
|
-
* // - Enable the API at:
|
|
202
|
-
* // https://console.developers.google.com/apis/api/travelimpactmodel.googleapis.com
|
|
203
|
-
* // - Login into gcloud by running:
|
|
204
|
-
* // `$ gcloud auth application-default login`
|
|
205
|
-
* // - Install the npm module by running:
|
|
206
|
-
* // `$ npm install googleapis`
|
|
207
|
-
*
|
|
208
|
-
* const {google} = require('googleapis');
|
|
209
|
-
* const travelimpactmodel = google.travelimpactmodel('v1');
|
|
210
|
-
*
|
|
211
|
-
* async function main() {
|
|
212
|
-
* const auth = new google.auth.GoogleAuth({
|
|
213
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
214
|
-
* scopes: [],
|
|
215
|
-
* });
|
|
216
|
-
*
|
|
217
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
218
|
-
* const authClient = await auth.getClient();
|
|
219
|
-
* google.options({auth: authClient});
|
|
220
|
-
*
|
|
221
|
-
* // Do the magic
|
|
222
|
-
* const res = await travelimpactmodel.flights.computeFlightEmissions({
|
|
223
|
-
* // Request body metadata
|
|
224
|
-
* requestBody: {
|
|
225
|
-
* // request body parameters
|
|
226
|
-
* // {
|
|
227
|
-
* // "flights": []
|
|
228
|
-
* // }
|
|
229
|
-
* },
|
|
230
|
-
* });
|
|
231
|
-
* console.log(res.data);
|
|
232
|
-
*
|
|
233
|
-
* // Example response
|
|
234
|
-
* // {
|
|
235
|
-
* // "flightEmissions": [],
|
|
236
|
-
* // "modelVersion": {}
|
|
237
|
-
* // }
|
|
238
|
-
* }
|
|
239
|
-
*
|
|
240
|
-
* main().catch(e => {
|
|
241
|
-
* console.error(e);
|
|
242
|
-
* throw e;
|
|
243
|
-
* });
|
|
244
|
-
*
|
|
245
|
-
* ```
|
|
246
198
|
*
|
|
247
199
|
* @param params - Parameters for request
|
|
248
200
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
package/build/v1.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE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,CAAC;gBAC5B,MAAM,GAAG,EAAoD,CAAC;gBAC9D,OAAO,GAAG,EAAE,CAAC;aACd;YAED,IAAI,OAAO,iBAAiB,KAAK,UAAU,EAAE;gBAC3C,QAAQ,GAAG,iBAAiB,CAAC;gBAC7B,OAAO,GAAG,EAAE,CAAC;aACd;YAED,MAAM,OAAO,GACX,OAAO,CAAC,OAAO,IAAI,2CAA2C,CAAC;YACjE,MAAM,UAAU,GAAG;gBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CACpB;oBACE,GAAG,EAAE,CAAC,OAAO,GAAG,oCAAoC,CAAC,CAAC,OAAO,CAC3D,cAAc,EACd,IAAI,CACL;oBACD,MAAM,EAAE,MAAM;iBACf,EACD,OAAO,CACR;gBACD,MAAM;gBACN,cAAc,EAAE,EAAE;gBAClB,UAAU,EAAE,EAAE;gBACd,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,IAAA,oCAAgB,EACd,UAAU,EACV,QAAyC,CAC1C,CAAC;aACH;iBAAM;gBACL,OAAO,IAAA,oCAAgB,EACrB,UAAU,CACX,CAAC;aACH;QACH,CAAC;KACF;IAtGY,qCAAgB,mBAsG5B,CAAA;AASH,CAAC,EAhUgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAgUpC"}
|
package/package.json
CHANGED
package/v1.ts
CHANGED
|
@@ -252,54 +252,6 @@ export namespace travelimpactmodel_v1 {
|
|
|
252
252
|
|
|
253
253
|
/**
|
|
254
254
|
* Stateless method to retrieve emission estimates. Details on how emission estimates are computed: https://github.com/google/travel-impact-model The response will contain all entries that match the input flight legs, in the same order. If there are no estimates available for a certain flight leg, the response will return the flight leg object with empty emission fields. The request will still be considered successful. Reasons for missing emission estimates include: - The flight is unknown to the server. - The input flight leg is missing one or more identifiers. - The flight date is in the past. - The aircraft type is not supported by the model. - Missing seat configuration. The request can contain up to 1000 flight legs. If the request has more than 1000 direct flights, if will fail with an INVALID_ARGUMENT error.
|
|
255
|
-
* @example
|
|
256
|
-
* ```js
|
|
257
|
-
* // Before running the sample:
|
|
258
|
-
* // - Enable the API at:
|
|
259
|
-
* // https://console.developers.google.com/apis/api/travelimpactmodel.googleapis.com
|
|
260
|
-
* // - Login into gcloud by running:
|
|
261
|
-
* // `$ gcloud auth application-default login`
|
|
262
|
-
* // - Install the npm module by running:
|
|
263
|
-
* // `$ npm install googleapis`
|
|
264
|
-
*
|
|
265
|
-
* const {google} = require('googleapis');
|
|
266
|
-
* const travelimpactmodel = google.travelimpactmodel('v1');
|
|
267
|
-
*
|
|
268
|
-
* async function main() {
|
|
269
|
-
* const auth = new google.auth.GoogleAuth({
|
|
270
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
271
|
-
* scopes: [],
|
|
272
|
-
* });
|
|
273
|
-
*
|
|
274
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
275
|
-
* const authClient = await auth.getClient();
|
|
276
|
-
* google.options({auth: authClient});
|
|
277
|
-
*
|
|
278
|
-
* // Do the magic
|
|
279
|
-
* const res = await travelimpactmodel.flights.computeFlightEmissions({
|
|
280
|
-
* // Request body metadata
|
|
281
|
-
* requestBody: {
|
|
282
|
-
* // request body parameters
|
|
283
|
-
* // {
|
|
284
|
-
* // "flights": []
|
|
285
|
-
* // }
|
|
286
|
-
* },
|
|
287
|
-
* });
|
|
288
|
-
* console.log(res.data);
|
|
289
|
-
*
|
|
290
|
-
* // Example response
|
|
291
|
-
* // {
|
|
292
|
-
* // "flightEmissions": [],
|
|
293
|
-
* // "modelVersion": {}
|
|
294
|
-
* // }
|
|
295
|
-
* }
|
|
296
|
-
*
|
|
297
|
-
* main().catch(e => {
|
|
298
|
-
* console.error(e);
|
|
299
|
-
* throw e;
|
|
300
|
-
* });
|
|
301
|
-
*
|
|
302
|
-
* ```
|
|
303
255
|
*
|
|
304
256
|
* @param params - Parameters for request
|
|
305
257
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|