Skip to content

Commit 74b5446

Browse files
feat(travelimpactmodel): update the api
#### travelimpactmodel:v1 The following keys were added: - resources.flights.methods.computeTypicalFlightEmissions (Total Keys: 7) - schemas.ComputeTypicalFlightEmissionsRequest (Total Keys: 4) - schemas.ComputeTypicalFlightEmissionsResponse (Total Keys: 5) - schemas.Market (Total Keys: 4) - schemas.TypicalFlightEmissions (Total Keys: 4)
1 parent d793443 commit 74b5446

File tree

2 files changed

+139
-10
lines changed

2 files changed

+139
-10
lines changed

docs/dyn/travelimpactmodel_v1.flights.html

Lines changed: 57 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ <h2>Instance Methods</h2>
7979
<p class="firstline">Close httplib2 connections.</p>
8080
<p class="toc_element">
8181
<code><a href="#computeFlightEmissions">computeFlightEmissions(body=None, x__xgafv=None)</a></code></p>
82-
<p class="firstline">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.</p>
82+
<p class="firstline">Stateless method to retrieve emission estimates. Details on how emission estimates are computed are in [GitHub](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.</p>
83+
<p class="toc_element">
84+
<code><a href="#computeTypicalFlightEmissions">computeTypicalFlightEmissions(body=None, x__xgafv=None)</a></code></p>
85+
<p class="firstline">Retrieves typical flight emissions estimates between two airports, also known as a market. If there are no estimates available for a certain market, the response will return the market object with empty emission fields. The request will still be considered successful. Details on how the typical emissions estimates are computed are on [GitHub](https://github.com/google/travel-impact-model/blob/main/projects/typical_flight_emissions.md). The request can contain up to 1000 markets. If the request has more than 1000 markets, it will fail with an INVALID_ARGUMENT error.</p>
8386
<h3>Method Details</h3>
8487
<div class="method">
8588
<code class="details" id="close">close()</code>
@@ -88,7 +91,7 @@ <h3>Method Details</h3>
8891

8992
<div class="method">
9093
<code class="details" id="computeFlightEmissions">computeFlightEmissions(body=None, x__xgafv=None)</code>
91-
<pre>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.
94+
<pre>Stateless method to retrieve emission estimates. Details on how emission estimates are computed are in [GitHub](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.
9295

9396
Args:
9497
body: object, The request body.
@@ -121,7 +124,7 @@ <h3>Method Details</h3>
121124
{ # Output definition for the ComputeFlightEmissions response.
122125
&quot;flightEmissions&quot;: [ # List of flight legs with emission estimates.
123126
{ # Direct flight with emission estimates.
124-
&quot;emissionsGramsPerPax&quot;: { # Grouped emissions per seating class results. # Optional. Per-passenger emission estimate numbers. Will not be present if emissions could not be computed. For the list of reasons why emissions could not be computed, see ComputeFlightEmissions. This field uses wtw emissions aka ttw_emissions_grams_per_pax + wtt_emissions_grams_per_pax.
127+
&quot;emissionsGramsPerPax&quot;: { # Grouped emissions per seating class results. # Optional. Per-passenger emission estimate numbers. Will not be present if emissions could not be computed. For the list of reasons why emissions could not be computed, see ComputeFlightEmissions.
125128
&quot;business&quot;: 42, # Emissions for one passenger in business class in grams. This field is always computed and populated, regardless of whether the aircraft has business class seats or not.
126129
&quot;economy&quot;: 42, # Emissions for one passenger in economy class in grams. This field is always computed and populated, regardless of whether the aircraft has economy class seats or not.
127130
&quot;first&quot;: 42, # Emissions for one passenger in first class in grams. This field is always computed and populated, regardless of whether the aircraft has first class seats or not.
@@ -140,12 +143,61 @@ <h3>Method Details</h3>
140143
},
141144
},
142145
],
143-
&quot;modelVersion&quot;: { # Travel Impact Model version. For more information about the model versioning see https://github.com/google/travel-impact-model/#versioning. # The model version under which emission estimates for all flights in this response were computed.
146+
&quot;modelVersion&quot;: { # Travel Impact Model version. For more information about the model versioning see [GitHub](https://github.com/google/travel-impact-model/#versioning). # The model version under which emission estimates for all flights in this response were computed.
147+
&quot;dated&quot;: &quot;A String&quot;, # Dated versions: Model datasets are recreated with refreshed input data but no change to the algorithms regularly.
148+
&quot;major&quot;: 42, # Major versions: Major changes to methodology (e.g. adding new data sources to the model that lead to major output changes). Such changes will be infrequent and announced well in advance. Might involve API version changes, which will respect [Google Cloud API guidelines](https://cloud.google.com/endpoints/docs/openapi/versioning-an-api#backwards-incompatible)
149+
&quot;minor&quot;: 42, # Minor versions: Changes to the model that, while being consistent across schema versions, change the model parameters or implementation.
150+
&quot;patch&quot;: 42, # Patch versions: Implementation changes meant to address bugs or inaccuracies in the model implementation.
151+
},
152+
}</pre>
153+
</div>
154+
155+
<div class="method">
156+
<code class="details" id="computeTypicalFlightEmissions">computeTypicalFlightEmissions(body=None, x__xgafv=None)</code>
157+
<pre>Retrieves typical flight emissions estimates between two airports, also known as a market. If there are no estimates available for a certain market, the response will return the market object with empty emission fields. The request will still be considered successful. Details on how the typical emissions estimates are computed are on [GitHub](https://github.com/google/travel-impact-model/blob/main/projects/typical_flight_emissions.md). The request can contain up to 1000 markets. If the request has more than 1000 markets, it will fail with an INVALID_ARGUMENT error.
158+
159+
Args:
160+
body: object, The request body.
161+
The object takes the form of:
162+
163+
{ # A list of pair of airports (markets) to request the typical emissions for.
164+
&quot;markets&quot;: [ # Required. Request the typical flight emissions estimates for this market pair. A maximum of 1000 markets can be requested.
165+
{ # A pair of airports.
166+
&quot;destination&quot;: &quot;A String&quot;, # Required. IATA airport code for flight destination, e.g. &quot;JFK&quot;.
167+
&quot;origin&quot;: &quot;A String&quot;, # Required. IATA airport code for flight origin, e.g. &quot;LHR&quot;.
168+
},
169+
],
170+
}
171+
172+
x__xgafv: string, V1 error format.
173+
Allowed values
174+
1 - v1 error format
175+
2 - v2 error format
176+
177+
Returns:
178+
An object of the form:
179+
180+
{ # The response includes the emissions but also the model version.
181+
&quot;modelVersion&quot;: { # Travel Impact Model version. For more information about the model versioning see [GitHub](https://github.com/google/travel-impact-model/#versioning). # The model version under which typical flight emission estimates for all flights in this response were computed.
144182
&quot;dated&quot;: &quot;A String&quot;, # Dated versions: Model datasets are recreated with refreshed input data but no change to the algorithms regularly.
145-
&quot;major&quot;: 42, # Major versions: Major changes to methodology (e.g. adding new data sources to the model that lead to major output changes). Such changes will be infrequent and announced well in advance. Might involve API version changes, which will respect guidelines in https://cloud.google.com/endpoints/docs/openapi/versioning-an-api#backwards-incompatible
183+
&quot;major&quot;: 42, # Major versions: Major changes to methodology (e.g. adding new data sources to the model that lead to major output changes). Such changes will be infrequent and announced well in advance. Might involve API version changes, which will respect [Google Cloud API guidelines](https://cloud.google.com/endpoints/docs/openapi/versioning-an-api#backwards-incompatible)
146184
&quot;minor&quot;: 42, # Minor versions: Changes to the model that, while being consistent across schema versions, change the model parameters or implementation.
147185
&quot;patch&quot;: 42, # Patch versions: Implementation changes meant to address bugs or inaccuracies in the model implementation.
148186
},
187+
&quot;typicalFlightEmissions&quot;: [ # Market&#x27;s Typical Flight Emissions requested.
188+
{ # Typical flight emission estimates for a certain market
189+
&quot;emissionsGramsPerPax&quot;: { # Grouped emissions per seating class results. # Optional. Typical flight emissions per passenger for requested market. Will not be present if a typical emissions could not be computed. For the list of reasons why typical flight emissions could not be computed, see [GitHub](https://github.com/google/travel-impact-model/blob/main/projects/typical_flight_emissions.md#step-7-validate-dataset).
190+
&quot;business&quot;: 42, # Emissions for one passenger in business class in grams. This field is always computed and populated, regardless of whether the aircraft has business class seats or not.
191+
&quot;economy&quot;: 42, # Emissions for one passenger in economy class in grams. This field is always computed and populated, regardless of whether the aircraft has economy class seats or not.
192+
&quot;first&quot;: 42, # Emissions for one passenger in first class in grams. This field is always computed and populated, regardless of whether the aircraft has first class seats or not.
193+
&quot;premiumEconomy&quot;: 42, # Emissions for one passenger in premium economy class in grams. This field is always computed and populated, regardless of whether the aircraft has premium economy class seats or not.
194+
},
195+
&quot;market&quot;: { # A pair of airports. # Required. Matches the flight identifiers in the request. Note: all IATA codes are capitalized.
196+
&quot;destination&quot;: &quot;A String&quot;, # Required. IATA airport code for flight destination, e.g. &quot;JFK&quot;.
197+
&quot;origin&quot;: &quot;A String&quot;, # Required. IATA airport code for flight origin, e.g. &quot;LHR&quot;.
198+
},
199+
},
200+
],
149201
}</pre>
150202
</div>
151203

0 commit comments

Comments
 (0)