View Single Post
  #9   Spotlight this post!  
Unread 14-03-2015, 21:36
plnyyanks's Avatar
plnyyanks plnyyanks is online now
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,113
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: Implementing TBA Api in Java

Here's a little more detailed info about the TBA API, now that I'm no longer trying to keep a regional on schedule...

The TBA API is pretty fully featured - it's got a lot of data you can pull in multiple ways. The simplest is the main API (documentation is here). You hit a url for the data you want, and get a response back. This is what the TBA Android app implements for its data source. Here are some links to getting started:
- Where API urls are built
- Where the HTTP Request is built
- All the model deserializers (to bring the json response into Java objects). I've been meaning to rip this out and make it into a library we can publish on maven central for other people to use, but that'll happen when I get the time...

TBA can also push live updates to a server of your choosing (documentation is here). This is how the Android app handles its push notifications. You subscribe your account to whatever you want (teams, events, everything, etc) and pick the notification types you would like to receive updates for, and TBA will push a POST request to a server you've registered every time something updates.

Here is an example project that implements a webhook receiver, and here specifically is where webhooks come in
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
Reply With Quote