pub async fn get_flight_plans(
    cid: u64,
    page: Option<u64>
) -> Result<PaginatedResponse<RestFlightPlans>, VatsimUtilError>
Expand description

Get a list of all the user’s previous flight plans.

Note that the structs returned by this function contain different fields from flight plans returned by the V3 live API.

A page number can optionally be specified.

Example

use vatsim_utils::rest_api::get_flight_plans;

let connections = get_flight_plans(1234567890, None).await.unwrap();
// or ...
let connections = get_flight_plans(1234567890, Some(3)).await.unwrap();

Errors

This function can fail if the HTTP request fails or if the returned data does not match the schemas of the models passed to the deserializer.