Skip to content

A Golang wrapper for retrieving data from iRacing

License

Notifications You must be signed in to change notification settings

SkippyZA/irstats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

irstats

Linters Test Go Reference Go Report Card codecov

This package is an API "wrapper" for retrieving data from iRacing. We use the term "wrapper" loosely as iRacing does not yet have an officially documented API; However, we've done our best to build something that might resemble one.

The goal of this project is to provide access to iRacing stats in a manner that is convienent, flexible, and efficient. In using this package, if you find something in its design that goes against these goals, we want to know.

Usage

import "github.com/skippyza/irstats"

Construct a new irstats client, then make a request to fetch data from iRacing.

irUsername := "<email address>"
irPassword := "<password>"

client, err := irstats.NewClient(irUsername, irPassword)
if err != nil {
  log.Fatalf("Failed to create client: %v", err)
}

subSessionID := "1000"
customerID := "1234"
data, _, err := client.SubSessionData(&subSessionID, &customerID)