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.
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)