# 航空 (https://nolantw.github.io/tdx/guides/air/)

```python
for flight in client.air.departures("TPE"):
    print(flight.airline_id, flight.number, flight.scheduled_at, flight.gate, flight.remark)

for weather in client.air.weather("TSA"):
    print(weather.airport_name, weather.temperature, weather.metar)
```

機場與航空公司以 IATA 代碼指定，省略時取得全部。國內線票價、當日航班與機位依航空公司查詢：

```python
for fare in client.air.domestic_fares("AE"):
    print(fare)
```

| 類別 | 方法 |
| --- | --- |
| 基本資料 | `airports`、`airlines`、`news` |
| 即時航班 | `departures`、`arrivals`、`flights`、`airport_boards` |
| 班表 | `recurring_schedules`、`domestic_schedules` |
| 國內線 | `domestic_fares`、`seat_availability` |
| 氣象 | `weather` |

所有參數與欄位見[航空 API](/reference/air)。