pseudonym117 / Riot-Watcher

Simple Python wrapper for the Riot Games API for League of Legends
MIT License
531 stars 150 forks source link

account-v1 getting puuid by_riot_id #231

Open JavierAlcaraz opened 8 months ago

JavierAlcaraz commented 8 months ago

Wich is the correct way of getting the PUUID from account-v1?

I tried this but didn't work:

account_data = lol_watcher.account.by_riot_id(region, game_name=name, tag_line=tag_line)

Osakah-py commented 8 months ago

Hello there!

Please note that account-v1 is not included in LolWatcher; it is actually an endpoint provided by RiotWatcher.

To use it correctly, you should import RiotWatcher in your Python script as follows:

from riotwatcher import RiotWatcher
riot_watcher = RiotWatcher('your-api-key') 

Once you've set up your RiotWatcher instance, you can access the account-v1 API like this :

account_data = riot_watcher.account.by_riot_id(region, game_name="Caps", tag_line="45555")

[!NOTE]\ You will notice that the possible values for region available here are: americas, asia, and europe

Hope it helps! Osakah <3