meraki-analytics / orianna

A Java framework for the Riot Games League of Legends API (http://developer.riotgames.com/).
MIT License
182 stars 56 forks source link

How I can get the timeline of a match? #94

Closed MinCha closed 6 years ago

MinCha commented 6 years ago

Dear developers, As a title, How I can get the timeline of a match? I could not find out a method to call a URL as "/lol/match/v3/timelines/by-match/{matchId}"

jjmaldonis commented 6 years ago

You can use a_match.getTimeline().

MinCha commented 6 years ago

@jjmaldonis That`s a just Timeline, not MatchTimeline. How can I use MatchTimeline?

robrua commented 6 years ago

Timeline is the core-level user-facing type that should be used to access information from "/lol/match/v3/timelines/by-match/{matchId}". MatchTimeline is a data container used internally to support Timeline. If you're using the core types in the rest of your code with Orianna, you definitely want Timeline rather than MatchTimeline.

You can also get a Timeline using Timeline.withId(matchId).get() in addition to match.getTimeline().

If you're sure you want to use the raw dto-level data containers that are used internally instead of the core Orianna API, there's no convenient user-facing API for getting that data. Let me know if that's the case and I can give you some details on how you would do that.