This site prioritizes game information. Would you like to keep that way or would you want to priortize game prices? Prioritize PricesPrioritize Information

(Change this option in the future in the Account dropdown)

alexscottbecker

alexscottbecker

No Description

  • Joined 24 days ago
  • BGA Wiki Contributions: 0

Avatars Unlocked

No Avatars Unlocked

See All Avatars
See All

Forum Posts

See All

Recent Comments

Thanks for confining I'm at least not on the completely wrong track! If I come up with something better I'll post here. I was also thinking a "rank" related endpoint would work, so I could request games ranked higher than 1000 or lower than 100 or whatever. 

I think you misunderstood my question, but thank you for the encouragement! I'm using Mongo at the moment. My question is how to get the entirety of the data from the API. For instance, right now I'm sending ten queries - the api maxes out at skipping 1000 entries. I think I'm not doing this in the right way. I think the search function is the right way to go, but I'm not sure.

 
  for (var i = 1; i < numPages + 1; i++) {
      var pageNum = (i - 1)*100;
      https.get(
        "https://api.boardgameatlas.com/api/search?client_id=" +
          process.env.BGAID +
          "&limit=100&skip=" +
          pageNum,
        (resp) => {
           ...handle response...
        }
  }