Open ImMrBloo opened 3 years ago
Drop me an email (so we can take this out of the Issue Reports) — I addressed this same problem in the same scenario for my community, and have some ideas and suggestions for you, depending on what your infrastructure looks like and what language you're coding in.
I'm soren(at)solarian(dot)net. Or, on Discord, I'm soren42#1701; send me a friend request and DM, if that works better. I'm happy to talk it through with you, either way.
Drop me an email (so we can take this out of the Issue Reports) — I addressed this same problem in the same scenario for my community, and have some ideas and suggestions for you, depending on what your infrastructure looks like and what language you're coding in.
I'm soren(at)solarian(dot)net. Or, on Discord, I'm soren42#1701; send me a friend request and DM, if that works better. I'm happy to talk it through with you, either way.
Hey I'm happy to add you but it appears you're not currently accepting friends requests. Here's my Discord info: ImMrBloo#2292
Hello, I run a Destiny 2 community with 9 clans inside of it. [900 players].
I'm trying to create an activity based Discord command that can track my members activity in Raids, PvP, and Dungeons along with if they've been playing with other clan members.
I've figured out I can pull the id's of each of my members in 9 api calls to each of the clans. and just use an array of their id's to cross reference the activities done to ensure my members are there or not.
What I'm running into an issue is I'm getting constantly rate limited or I'm being heavily hampered down by time constraints to do these checks.
The Api calls I'm currently making are:
9 Api calls to each individual clan through https://www.bungie.net/Platform/Destiny2/GroupV2/clanID/Members
loop through all 900 members by: getting their profile through https://www.bungie.net/Platform/Destiny2/Profile/MembershipID
I've then saved these to my own internal database so I don't need to make these profile calls anymore unless they are new to the clan.
I'm now for my pvp clan looking to: pull trials, survival, and iron banner information over a 7 day spread from each character
despite putting in a time range which should give me a fixed amount of entries between two the dates
for my raid clan I'm looking to
this forces me to pull from an unknown amount of pages
I'm doing these pulls from: https://www.bungie.net/Platform/Destiny2/Members_MembershipType/Account/Members_ID/character/Members_Character_ID/Stats/Activities/?mode=game_mode&page=0
my dilemma: This is a lot of api calls, and a massive amount of time to pull the information. On an unknown amount of pages which requires me to re loop through all potential pages in the duration
What I'm trying to figure out is there a better way to do this?
Is there not like a simpler way to pulling activity information that doesn't require so many api calls? (specifically each character and each potential unknown amount of pages)I'd love some feedback if I'm doing this poorly as I'd like to optimize this to not be a burden on the api. Thanks!