All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: AirlineFlightSchedules filter out duplicate schedules
PostPosted: Mon Feb 20, 2017 11:37 pm 
Offline
plohm12 - FlightAware user avatar

Joined: Mon Feb 20, 2017 9:47 pm
Posts: 2
I'm retrieving multiple future routes for a single airline using the following php statements:
Code:
$args = array(
   'startDate' => $startDate,
   'endDate' => $startDate + (86400 * 20),
   'origin' => '',
   'destination' => '',
   'flightno' => '',
   'airline' => 'DAL',
   'howMany' => 15,
   'offset' => 0,
   );
$result = $client->AirlineFlightSchedules($args);


I only wish to retrieve distinct results in terms of departure/arrival times, origin, destination, and flight number. Yet the first two results returned from this query are as follows:
Code:
[0] => stdClass Object
                        (
                            [ident] => DAL1446
                            [actual_ident] =>
                            [departuretime] => 1487661300
                            [arrivaltime] => 1487677620
                            [origin] => KSFO
                            [destination] => KATL
                            [aircrafttype] => B753
                            [meal_service] => First: Refreshments / Economy: Refreshments
                            [seats_cabin_first] => 24
                            [seats_cabin_business] => 0
                            [seats_cabin_coach] => 200
                        )

                    [1] => stdClass Object
                        (
                            [ident] => AMX5932
                            [actual_ident] => DAL1446
                            [departuretime] => 1487661300
                            [arrivaltime] => 1487677620
                            [origin] => KSFO
                            [destination] => KATL
                            [aircrafttype] => B753
                            [meal_service] =>
                            [seats_cabin_first] => 24
                            [seats_cabin_business] => 0
                            [seats_cabin_coach] => 200
                        )


I notice the flights are identical except a small difference between ident and actual_ident. How can I pass a query to only retrieve distinct schedules?


Top
 Profile  
 
 Post subject: Re: AirlineFlightSchedules filter out duplicate schedules
PostPosted: Tue Feb 21, 2017 6:01 pm 
Offline
FlightAware Staff
bovineone - FlightAware user avatar

Joined: Wed Jul 27, 2005 3:00 am
Posts: 1441
Location: FlightAware WHQ
Those are codeshare flights that are sold and ticketed under multiple identities. Currently there is no way to exclude them from the API response.


Top
 Profile  
 
 Post subject: Re: AirlineFlightSchedules filter out duplicate schedules
PostPosted: Tue Feb 21, 2017 7:24 pm 
Offline
plohm12 - FlightAware user avatar

Joined: Mon Feb 20, 2017 9:47 pm
Posts: 2
Can I create a feature request somewhere? I'd like to limit query results that are returned so that I don't get charged more than necessary. If I'm pulling tens of thousands of flight schedules, I don't want to be forced to pay for results I will discard immediately anyway, especially if it's any more than 10% of my data set.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to: