How to retrieve data?

So I’ve been on and off with this project for a while now because I can’t figure out how to call data, like get a username, stats and all of that good stuff. Anyone know what to code needed for this is?

Hi!
When you say data, do you mean game-specific data? And if so, which game?

Hey!

Yeah game-specific data like objectives, K/D/A but also profile data / account data for the desktop overview like match history, username, most played champion. The game is League of Legends.

In that case, for as long as the data can be found through one of the events listed in here, all you need to do is “sign up” to that event (using overwolf.games.events.setRequiredFeatures). Once you do that, you will be notified of any changes or new events from the “features” you signed up for through the overwolf.games.events.onNewEvents event.
Specifically, for things that count as “info-updates”, you can also use overwolf.games.events.getInfo() to get their current state, and overwolf.games.events.onInfoUpdates2() to get notified of changes to the game info.

Do note that if you cannot find some of the data you’re looking for, it might just be sitting under the launcher’s events list, which has a similar workflow, but utilizes the overwolf.games.launchers.events api.

Ok, I barely understand the code. It’s been awhile but I think I get it. However how would I call on the retrieved data. With region I can just give it a span a “region” id and it works but for “summoner_info” it doesn’t do anything. The only reference I can find is in “SummonerInfoFetcher.js” but like I said, I can barely understand the code. Any assistance?

Hi!
I assume you are referring to the summoner and team info sample app. If so, this is an old sample app, that is somewhat outdated. While its code might still work, it is not the recommended workflow, in part due to the code being somewhat difficult to understand.

If you want to use any information obtained from events, just use their values directly, as you would work with any other json.
You can see the live values from a game for comparison, by using the official sample app.