Skip to content

frc1418/tbago

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tbago

1418 TBA Libraries // Python // Go // Ruby

Go library for interfacing with The Blue Alliance API (v3).

Installation

go get github.com/frc1418/tbago

To use it in your project:

import (
    ...
    "github.com/frc1418/tbago"
    ...
)

Data Retrieval

Data retrieval may appear somewhat complicated at first, as it uses a builder pattern scheme to structure requests. However, once you gain an understanding of this system the library is quite simple to use.

Before retrieving data, you must instantiate the library, providing a valid TBA API key. The Blue Alliance's API requires that all applications identify themselves with an auth key when retrieving data. To obtain an auth key, visit TBA's Account page.

tba, err := tbago.New(token)
// Always handle errors

There are several base requests you can make: Status(), Teams(page int), Teams(number int), Events(year int), Event(id string), Match(key string), Districts(year int), and District(abbreviation string, year int).

If you like, you can stop there:

team, err := tba.Team(1418).Get()
// Handle error

However, you can also modify those requests before sending them. Many requests support Simple() or Year() modifiers for optional request parameters.

In addition, if you want to, say, get a list of the teams present at a given event, you would form your request thus:

teams, err := tba.Event("2017chcmp").Teams().Get()

Specific options can be found by searching through the source code.

Authors

tbago was originally published as tba by Carl Colglazier.

Development is now led by Erik Boesen through Team 1418.

License

This software is available under the terms of the ISC License.

About

📈 Go library for fetching data from The Blue Alliance API (v3).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages