I'm experiencing an odd issue with the faction attacks API and was hoping for a quick review to figure out if it's me or the API that's generating the issue.
I'm attempting to pull several thousand records from a given date, my process is to request the first set of 100 records using the link below -
https://api.torn.com/faction/${factionID}?selections=attacks&key=${process.env.TORNAPIKEY}&from=${from}
This is populated with our own faction ID, my own API key and the from date in the correct format.
I then populate the from field with the latest timestamp_ended value to query the next set of 100 records and keep querying every 30 seconds until I've the full range of results that I need.
My experience with this though is that there are always a few records missing from start to finish and the quantity missing seems to differ, despite the API returning no errors and me confirming that all returned records are correctly saved to my database, which makes me think that the API may not be returning the correct records in some cases.
I'm attempting to pull several thousand records from a given date, my process is to request the first set of 100 records using the link below -
https://api.torn.com/faction/${factionID}?selections=attacks&key=${process.env.TORNAPIKEY}&from=${from}
This is populated with our own faction ID, my own API key and the from date in the correct format.
I then populate the from field with the latest timestamp_ended value to query the next set of 100 records and keep querying every 30 seconds until I've the full range of results that I need.
My experience with this though is that there are always a few records missing from start to finish and the quantity missing seems to differ, despite the API returning no errors and me confirming that all returned records are correctly saved to my database, which makes me think that the API may not be returning the correct records in some cases.