FlightAware > Discussions
http://discussions.flightaware.com/

Total count of records of query
http://discussions.flightaware.com/flightxml/total-count-of-records-of-query-t38781.html
Page 1 of 1

Author:  jtthomas10 [ Mon Mar 13, 2017 8:06 pm ]
Post subject:  Total count of records of query

First time poster here, so I apologize if I've misinterpreted some things.

I get that a query will return 15 records by default, and that is configurable via setting the howmany in combo with a call to SetMaximumResultsSize.

I have question then.

Is there a way to know the total number of records my query in total has so I know how many times to loop through in case my howmany/SMRS isn't big enough?

For example, if I call to get all of American's flights out of Chicago for a day, and I leave the default at 15.

How can I know how many times do I need to keep calling back to get the entire data set? Or, do I just keep looping through until my nextOffset is the same as the last one?

Sorry if this is a noob question.

Thanks,
Jeff

Author:  mduell [ Mon Mar 13, 2017 9:41 pm ]
Post subject:  Re: Total count of records of query

Keep going until you don't get 15 or you hit your date/time limit.

Author:  bovineone [ Fri Mar 17, 2017 10:16 am ]
Post subject:  Re: Total count of records of query

Keep going until you get a nextOffset of -1 or you hit your date/time limit.

(You may sometimes get a result count less than 15 for a single page, due to encountering blocked or inaccessible flights.)

Page 1 of 1 All times are UTC - 6 hours [ DST ]