https://github.com/skippyza/irstats
A Golang wrapper for retrieving data from iRacing
https://github.com/skippyza/irstats
golang golang-library iracing iracing-api
Last synced: 5 months ago
JSON representation
A Golang wrapper for retrieving data from iRacing
- Host: GitHub
- URL: https://github.com/skippyza/irstats
- Owner: SkippyZA
- License: mit
- Created: 2021-05-14T16:49:00.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-09T18:01:40.000Z (almost 2 years ago)
- Last Synced: 2025-05-04T14:47:19.475Z (about 1 year ago)
- Topics: golang, golang-library, iracing, iracing-api
- Language: Go
- Homepage:
- Size: 103 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# irstats
[](https://github.com/SkippyZA/irstats/actions/workflows/lint.yml)
[](https://github.com/SkippyZA/irstats/actions/workflows/test.yml)
[](https://pkg.go.dev/github.com/skippyza/irstats)
[](https://goreportcard.com/report/github.com/skippyza/irstats)
[](https://codecov.io/gh/SkippyZA/irstats)
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
```go
import "github.com/skippyza/irstats"
```
Construct a new irstats client, then make a request to fetch data from iRacing.
```go
irUsername := ""
irPassword := ""
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)
```