https://github.com/ferueda/go-f1-fantasy
Go library for accessing the F1 Fantasy Game API (https://fantasy.formula1.com/)
https://github.com/ferueda/go-f1-fantasy
f1 go golang
Last synced: 5 months ago
JSON representation
Go library for accessing the F1 Fantasy Game API (https://fantasy.formula1.com/)
- Host: GitHub
- URL: https://github.com/ferueda/go-f1-fantasy
- Owner: ferueda
- License: mit
- Created: 2022-07-23T20:09:13.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-24T21:30:50.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T16:55:47.965Z (almost 2 years ago)
- Topics: f1, go, golang
- Language: Go
- Homepage: https://pkg.go.dev/github.com/ferueda/go-f1-fantasy
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
go-f1-fantasy
=======
[](https://github.com/ferueda/go-f1-fantasy/releases)
[](http://godoc.org/github.com/ferueda/go-f1-fantasy)
[](https://github.com/ferueda/go-f1-fantasy/actions?query=workflow%3Atests)
go-f1-fantasy is a Go client library for accessing the [F1 Fantasy Game API](https://fantasy.formula1.com/).
## Installation
To install the library, simply
`go get github.com/ferueda/go-f1-fantasy`
## Usage
```go
import "github.com/ferueda/go-f1-fantasy/f1"
```
Construct a new client, then use the various services on the client to access different parts of the API. For example:
```go
client := f1.NewClient(nil)
ctx := context.Background()
// list all drivers
drivers, err := client.Drivers.ListAll(ctx)
// get one team by id
team, err := client.Teams.GetOne(ctx, 3)
```
## How to Contribute
* Fork a repository
* Add/Fix something
* Check that tests are passing
* Create PR
Current contributors:
- [Felipe Rueda](https://github.com/ferueda)
## License ##
This library is distributed under the MIT License found in the [LICENSE](./LICENSE)
file.