Go to Post Injuries can come out of no where. I know this is only a robotics competition but the injury doesnt care where or what you are doing. - nightrenegade00 [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-01-2017, 13:57
techguy9984 techguy9984 is offline
Registered User
FRC #4859
 
Join Date: Jul 2016
Location: Rochester, MN
Posts: 9
techguy9984 is an unknown quantity at this point
TBA-API to end all TBA-APIs. (Java)

With the new robotics season already started up, I figured a powerful TBA API would be useful to some of you. I built a scouting app a while back and was noticing that all the Java APIs that I found on the TBA api-docs page didn't work very well and were always breaking.

So I created my own API. Everything (all methods) has (have) been tested thoroughly on both the PC and Android. It contains a method for EVERY single pull request listed on the TBA api page. It's also got tons of configuration settings for how to pull data, along with a testing class, a full-fledged github wiki with installation, tutorials, and working examples. Let me know if you find this project useful! Knowing that people are using and enjoy my API drives me to make it better!

Here's the link:
https://github.com/techguy9984/TBA-API
Reply With Quote
  #2   Spotlight this post!  
Unread 26-01-2017, 13:39
Mike Schreiber's Avatar
Mike Schreiber Mike Schreiber is offline
Registered User
FRC #0067 (The HOT Team)
Team Role: Mentor
 
Join Date: Dec 2006
Rookie Year: 2006
Location: Milford, Michigan
Posts: 486
Mike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond repute
Re: TBA-API to end all TBA-APIs. (Java)

This would be really cool if I used Java. I'm not very good at it myself, so I've been using requests in Python for my TBA pulls, it makes things pretty user friendly. If I ever make the switch I'll be sure to keep this in mind. Thanks for posting.
__________________
Mike Schreiber

Kettering University ('09-'13) University of Michigan ('14-'18?)
FLL ('01-'02), FRC Team 27 ('06-'09), Team 397 ('10), Team 3450/314 ('11), Team 67 ('14-'??)
Reply With Quote
  #3   Spotlight this post!  
Unread 26-01-2017, 21:20
lucas.alvarez96's Avatar
lucas.alvarez96 lucas.alvarez96 is offline
Registered User
AKA: Lucas Alvarez
FRC #2576 (Chilean Heart)
 
Join Date: Dec 2013
Rookie Year: 2013
Location: Chile
Posts: 123
lucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to all
Re: TBA-API to end all TBA-APIs. (Java)

Quote:
Originally Posted by Mike Schreiber View Post
This would be really cool if I used Java. I'm not very good at it myself, so I've been using requests in Python for my TBA pulls, it makes things pretty user friendly. If I ever make the switch I'll be sure to keep this in mind. Thanks for posting.
Are you using a certain library or just urllib requests? I tried using the Python library recommended on the API docs by TBA but kept on getting a 403 error. Apparently they're blocking calls without a User-Agent.
__________________
FRC 2576 2015-2016: Mentor
FRC 2576 2013-2015: Programmer & Chairman's Presenter

Los Angeles Regional 2014: Regional Chairman's Award
Reply With Quote
  #4   Spotlight this post!  
Unread 26-01-2017, 22:37
Eugene Fang's Avatar
Eugene Fang Eugene Fang is offline
The Blue Alliance
no team
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Bay Area, CA -> Pittsburgh, PA
Posts: 772
Eugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond reputeEugene Fang has a reputation beyond repute
Re: TBA-API to end all TBA-APIs. (Java)

Quote:
Originally Posted by lucas.alvarez96 View Post
Are you using a certain library or just urllib requests? I tried using the Python library recommended on the API docs by TBA but kept on getting a 403 error. Apparently they're blocking calls without a User-Agent.
Yeah that didn't used to be the case, but then we put everything behind Cloudflare, which apparently requires a user agent to be set. Must have broken that library.
__________________
Eugene Fang
2010 Silicon Valley Regional Dean's List Finalist

Various FLL Teams - Student (2000-2006), Mentor (2007-2010)
FRC Team 604 - Student (2007-2010), Mentor/Remote Advisor (2011-2015)
FRC Team 1323 - Mentor/Remote Advisor (2011-2014)

The Blue Alliance | TBA GameDay | TBA Android App
Reply With Quote
  #5   Spotlight this post!  
Unread 27-01-2017, 00:03
Mike Schreiber's Avatar
Mike Schreiber Mike Schreiber is offline
Registered User
FRC #0067 (The HOT Team)
Team Role: Mentor
 
Join Date: Dec 2006
Rookie Year: 2006
Location: Milford, Michigan
Posts: 486
Mike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond reputeMike Schreiber has a reputation beyond repute
Re: TBA-API to end all TBA-APIs. (Java)

Quote:
Originally Posted by lucas.alvarez96 View Post
Are you using a certain library or just urllib requests? I tried using the Python library recommended on the API docs by TBA but kept on getting a 403 error. Apparently they're blocking calls without a User-Agent.
Yes I am using the requests library, I couldn't get urllib to work either. You can get requests from here.

I recommend the pip install since it's really easy. If you don't have pip the walk through is pretty good.

PM me and I can send you some sample code, I don't want to derail this thread too much.
__________________
Mike Schreiber

Kettering University ('09-'13) University of Michigan ('14-'18?)
FLL ('01-'02), FRC Team 27 ('06-'09), Team 397 ('10), Team 3450/314 ('11), Team 67 ('14-'??)
Reply With Quote
  #6   Spotlight this post!  
Unread 30-01-2017, 00:06
endreman0's Avatar
endreman0 endreman0 is offline
Programmer at Heart
AKA: Ian W
FRC #4131 (Iron Patriots)
Team Role: Leadership
 
Join Date: Sep 2015
Rookie Year: 2014
Location: Washington
Posts: 12
endreman0 is an unknown quantity at this point
Re: TBA-API to end all TBA-APIs. (Java)

If Maven isn't too much hassle to you, I'd appreciate it. It makes updating super easy, and is how I normally build projects.
__________________
It's a hardware problem. No matter what it is. Everything is a hardware problem. Everything.

"We were going to go to girls gen... then money stopped existing" -Mikal, 4513
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:45.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi