Skip to content

Commit

Permalink
Add last_series() for race-info app
Browse files Browse the repository at this point in the history
  • Loading branch information
lowlyocean committed Jan 6, 2019
1 parent 07b6251 commit 6df88f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ir_webstats/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,14 @@ def all_seasons(self):
pprint("Getting iRacing Seasons with Stats")
resp = self.__req(ct.URL_SEASON_STANDINGS2)
return self._load_irservice_var("SeasonListing", resp)

def last_series(self, userid):
""" Returns stats for the last 3 series the driver has raced in """

r = self.__req(ct.URL_LAST_SERIES % userid)
res = parse(r)

return res

@logged_in
def season_standings(self, season, carclass, club=ct.ALL, raceweek=ct.ALL,
Expand Down
1 change: 1 addition & 0 deletions ir_webstats/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
URL_SELECT_SERIES = 'http://members.iracing.com/membersite/member/SelectSeries.do?&season=%s&view=undefined&nocache=%s'
URL_SESSION_TIMES = 'http://members.iracing.com/membersite/member/GetSessionTimes'#T-m-d
URL_SERIES_RACERESULTS = 'http://members.iracing.com/memberstats/member/GetSeriesRaceResults'
URL_LAST_SERIES = 'http://members.iracing.com/memberstats/member/GetLastSeries?custid=%s'

URL_GET_EVENTRESULTS = 'http://members.iracing.com/membersite/member/GetEventResultsAsCSV?subsessionid=%s&simsesnum=%s&includeSummary=1' #simsesnum 0 race, -1 qualy or practice, -2 practice

Expand Down

0 comments on commit 6df88f1

Please sign in to comment.