-
Notifications
You must be signed in to change notification settings - Fork 1
3. Usage
Parsa Dahesh edited this page Nov 12, 2020
·
9 revisions
In order to read the data define and initialize a new variable of MotoGPData
:
MotoGPData data = new MotoGPData();
List<RiderSession> getSessionResults(Category category, int year, String raceCode, Session session);
List<RiderSession> getSessionResults(Category category, int year, int raceNumber, Session session);
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
category |
Category |
Category | Category.MotoGP |
year |
int |
Season's year | 2019 |
raceCode |
String |
Race code: check Motorsport Stats for the correct one | QAT |
raceNumber |
int |
Race number: starts from 1
|
1 |
session |
Session |
Session | Session.RACE |
List<RiderStandings> getRidersStandings(...);
List<ConstructorStandings> getConstructorsStandings(...);
List<TeamStandings> getTeamsStandings(...);
Required Parameters
Parameter | Type | Description | Example |
---|---|---|---|
category |
Category |
Category | Category.Moto2 |
year |
int |
Season's year | 2010 |
Optional Parameters to get the standings after a specific grandprix
Parameter | Type | Description | Example |
---|---|---|---|
raceCode |
String |
Race code: check Motorsport Stats for the correct one | QAT |
raceNumber |
int |
Race number: starts from 1
|
1 |
MotoGPData data = new MotoGPData();
List<RiderSession> raceByRaceCode = data.getSessionResults(Category.MotoGP, 2019, "QAT", Session.RACE);
List<RiderSession> gridByRaceNumber = data.getSessionResults(Category.Moto2, 2015, 8, Session.GRID);
List<ConstructorStandings> constructorsStandings = data.getConstructorStandings(Category.MotoGP, 2010);
List<RiderStandings> riderstandingsAfterARace = data.getChampionshipStandings(Category.MotoGP, 2019, 2);