Confusion with how /games/updates should be used.

Need help with your application? Ask here.
Post Reply
tanderson
Posts: 13
Joined: Wed Jul 10, 2019 2:43 pm

Confusion with how /games/updates should be used.

Post by tanderson » Thu Jul 11, 2019 1:51 pm

So I use /Games/ByPlatformID to get a complete list of games. I cache all that data to my DB to use later.

Now I want to refresh that data using /games/update however I don't see where I should get last_edit_id from which is a mandatory field according to Swagger.

Ideally, i want to provide the most recent last_updated from the /Games/ByPlatformID API. That should give me a starting point to start applying updates from.

Am I missing how this is supposed to work?

User avatar
Zer0xFF
Posts: 281
Joined: Fri Apr 20, 2018 9:18 am

Re: Confusion with how /games/updates should be used.

Post by Zer0xFF » Fri Jul 12, 2019 1:02 pm

Hi, `last_edit_id` is not required, its the recommend way, unfortunately the documentation doesn't have a way for us to express that.

so how you should go about it is, use `time` (in minutes) the 1st time to poll all the latest changes that happened since you cloned the database, then use the last `edit_id` of your last update call as `last_edit_id` for subsequent calls etc etc etc.

edit:
there are planned to address this, and make it easier to get started without having to use `time` the 1st time, but those will be for future updates.
Regards
Zer0xFF

tanderson
Posts: 13
Joined: Wed Jul 10, 2019 2:43 pm

Re: Confusion with how /games/updates should be used.

Post by tanderson » Fri Jul 12, 2019 1:12 pm

Ok, understood. I was confused that the documentation said Last_edit_id was required.

Never though to try leaving it out.

I can figure this out on my own but maybe its quicker to ask, is the date in minutes in epoch time (since 1970) or is it the number of minutes ago that i last updated. If its the latter what is the maximum number of minutes i can query, the old API was only 30 days i think, is that still the case?

User avatar
Zer0xFF
Posts: 281
Joined: Fri Apr 20, 2018 9:18 am

Re: Confusion with how /games/updates should be used.

Post by Zer0xFF » Sat Jul 13, 2019 10:33 am

its minutes since last update, and no there is no limit.
Regards
Zer0xFF

Post Reply