ShoobyDoo / OPGG.py

An unofficial Python library for accessing OPGG data.
BSD 3-Clause "New" or "Revised" License
9 stars 4 forks source link

Create a method to call "Update" on a summoner profile #9

Closed ShoobyDoo closed 2 months ago

ShoobyDoo commented 8 months ago

There's an endpoint at: https://op.gg/api/v1.0/internal/bypass/summoners/na/<summoner_id>/renewal which is sent a POST when the Update button is clicked on a given user profile.

Given the nature of the search function, it might also make sense to create an "update" method that is called just before a search is performed to ensure the most recent data is extracted.

Perhaps some sort of prompt or a condition? (If the account hasn't been updated in X amount of time, automatically do it.) Requires about 3-4 seconds after sending the POST to actually update... uncontrollable as its done opgg serverside.

Likely going to require a slight delay (simple sleep, or something, then another ping to check for update date, and then extraction..?

ShoobyDoo commented 2 months ago

Instead of worrying about adding a sleep/delay, I will leave the update functionality to the users descretion. Instead, this will be added as a utility method that can be called by passing a summoner id.