| 1 | # openapi.api.FlightAlertsApi |
| 2 | |
| 3 | ## Load the API package |
| 4 | ```dart |
| 5 | import 'package:openapi/api.dart'; |
| 6 | ``` |
| 7 | |
| 8 | All URIs are relative to *http://localhost* |
| 9 | |
| 10 | Method | HTTP request | Description |
| 11 | ------------- | ------------- | ------------- |
| 12 | [**flightAlertsControllerSubscribeV1**]( |
| 13 | [**flightAlertsControllerUnsubscribeV1**]( |
| 14 | |
| 15 | |
| 16 | # **flightAlertsControllerSubscribeV1 |
| 17 | > flightAlertsControllerSubscribeV1(id, flightAlertDTO) |
| 18 | |
| 19 | Subscribe to push alerts for a flight |
| 20 | |
| 21 | Registers a OneSignal subscription (player) ID to receive push notifications when this flight changes (status, gate, terminal, delays, baggage claim, airport delays). |
| 22 | |
| 23 | ### Example |
| 24 | ```dart |
| 25 | import 'package:openapi/api.dart'; |
| 26 | |
| 27 | final api = Openapi(). |
| 28 | final String id = id_example; |
| 29 | final FlightAlertDTO flightAlertDTO = ; |
| 30 | |
| 31 | try { |
| 32 | api.flightAlertsControllerSubscribeV1(id, flightAlertDTO); |
| 33 | } on DioException catch (e) { |
| 34 | print('Exception when calling FlightAlertsApi->flightAlertsControllerSubscribeV1: $e\n |
| 35 | } |
| 36 | ``` |
| 37 | |
| 38 | ### Parameters |
| 39 | |
| 40 | Name | Type | Description | Notes |
| 41 | ------------- | ------------- | ------------- | ------------- |
| 42 | **id** | ** |
| 43 | **flightAlertDTO** | [ |
| 44 | |
| 45 | ### Return type |
| 46 | |
| 47 | void (empty response body) |
| 48 | |
| 49 | ### Authorization |
| 50 | |
| 51 | [JWT-auth](../README.md#JWT-auth) |
| 52 | |
| 53 | ### HTTP request headers |
| 54 | |
| 55 | - **Content-Type** |
| 56 | - **Accept** |
| 57 | |
| 58 | [[Back to top]](#) |
| 59 | |
| 60 | # **flightAlertsControllerUnsubscribeV1 |
| 61 | > flightAlertsControllerUnsubscribeV1(id, flightAlertDTO) |
| 62 | |
| 63 | Unsubscribe from push alerts for a flight |
| 64 | |
| 65 | Removes a OneSignal subscription (player) ID from a flight’s alert list. Tracking stops once no devices remain. |
| 66 | |
| 67 | ### Example |
| 68 | ```dart |
| 69 | import 'package:openapi/api.dart'; |
| 70 | |
| 71 | final api = Openapi(). |
| 72 | final String id = id_example; |
| 73 | final FlightAlertDTO flightAlertDTO = ; |
| 74 | |
| 75 | try { |
| 76 | api.flightAlertsControllerUnsubscribeV1(id, flightAlertDTO); |
| 77 | } on DioException catch (e) { |
| 78 | print('Exception when calling FlightAlertsApi->flightAlertsControllerUnsubscribeV1: $e\n |
| 79 | } |
| 80 | ``` |
| 81 | |
| 82 | ### Parameters |
| 83 | |
| 84 | Name | Type | Description | Notes |
| 85 | ------------- | ------------- | ------------- | ------------- |
| 86 | **id** | ** |
| 87 | **flightAlertDTO** | [ |
| 88 | |
| 89 | ### Return type |
| 90 | |
| 91 | void (empty response body) |
| 92 | |
| 93 | ### Authorization |
| 94 | |
| 95 | [JWT-auth](../README.md#JWT-auth) |
| 96 | |
| 97 | ### HTTP request headers |
| 98 | |
| 99 | - **Content-Type** |
| 100 | - **Accept** |
| 101 | |
| 102 | [[Back to top]](#) |
| 103 | |