Skip to content

GreenPerk

José Ignacio Amelivia Santiago edited this page Mar 3, 2022 · 5 revisions

Get flight emissions

Get flight emissions endpoint reference on the official TravelPerk documentation.

This function will return the carbon emissions for a flight.

travelperk.greenperk().greenperk().flight_emissions(
  'BCN',
  'LHR',
  'economy',
  'BA'
)

Get train emissions

Get train emissions endpoint reference on the official TravelPerk documentation.

This function will return the carbon emissions for a train.

travelperk.greenperk().greenperk().train_emissions(
  'c44ba069-4109-4b40-815c-bf519c2c2844',
  '637d125e-9d00-478a-822c-e60c6e219227',
  'eurostar'
)

Get car emissions

Get car emissions endpoint reference on the official TravelPerk documentation.

This function will return the carbon emissions for a car.

travelperk.greenperk().greenperk().car_emissions('MCFD', 2, 100)

Get hotel emissions

Get hotel emissions endpoint reference on the official TravelPerk documentation.

This function will return the carbon emissions for a hotel.

travelperk.greenperk().greenperk().hotel_emissions('ES', 2)