![]() |
Retrieve data from TheBlueAlliance
Hello Chief Delphi,
I am currently trying to write an android app and I need to pull the team lists from specific regionals in 2013. I am able to parse the CD-Spy xml feed from last year to gain match results, and I am able to parse the match results, awards, and rankings from 2012 from the usFIRST.org site which is in HTML format. But now I would like to try and parse either thebluealliance regional data or the queries on the usfirst site for this upcoming year. I cannot seem to get it right and I am having a whole bunch of trouble. Can anyone explain what web formats are used in these sites or how I should go about trying to parse this information? Thanks! |
Re: Retrieve data from TheBlueAlliance
Did you see the following on the contact us page?
Quote:
|
Re: Retrieve data from TheBlueAlliance
You know I went to the contact page but my head was still wrapped up in code world and I wasn't paying attention :o I will get in contact to see if that will be of some interest to me. But as for usfirst.org in the meantime, suggestions would be great.
|
Re: Retrieve data from TheBlueAlliance
Quote:
|
Re: Retrieve data from TheBlueAlliance
Quote:
|
Re: Retrieve data from TheBlueAlliance
Quote:
https://github.com/gregmarra/the-blu...-Documentation You should be able to pull list of team names and numbers with a combination of the calls to ApiEventList (to get all events), ApiEventDetails (to get all teams for an event), and ApiTeamsShow (to get info for a list of teams). |
Re: Retrieve data from TheBlueAlliance
I've used The FIRST Alliance for a test scouting app that I was working on a little while ago.
Their API is pretty nice. Here is some sample code, it gets all the teams from a regional and outputs them according to their ranking. It could easily be extended to get the team name. Code:
package org.team3309.scout;If you need to find your event id, you can get the data from http://www.thefirstalliance.org/api/...on=list-events Edit: TBA's API looks nice too, if you want to use that you can still use the getJSON method (not getArray) if you don't know how to do HTTP GET in Android Edit 2: Don't forget to add the INTERNET permission to your manifest. I've done that in probably every app that I've made and I feel more and more stupid each time. |
Re: Retrieve data from TheBlueAlliance
Quote:
|
Re: Retrieve data from TheBlueAlliance
If you want to fetch the data from FIRST directly, check out what we do in our FIRST Field Management System parser, which gets nicknames by parsing https://my.usfirst.org/frc/scoring/i...?page=teamlist
https://github.com/gregmarra/the-blu...list_parser.py I'm always happy to help people if they want to reach out to me with questions. Sounds like we should make our contact page a bit clearer :D |
Re: Retrieve data from TheBlueAlliance
Thank you very much for your responses! I was able to get both TFA and TBA up and running. I decided to stick with my html parser for awards, match data, and rankings because it is faster on my android device when refreshing information but as for the team listings, I decided to use The Blue Alliance. For those of you interested, I added my code that I used to develop my methods (in netbeans) before I moved in to Eclipse. So the code was just temporary but it works!
Code:
package bluealliance; |
Re: Retrieve data from TheBlueAlliance
I must warn if you try to roll your own, FIRST's website does some really goofy session management. For example, if you want to pull a complete team list, you'll want to pull 250 teams/page rather than the default. However, there's no way to do this through just a URL alone. You must first request a page, extract the session ID they give you from an href field (,the myarea var) then use that session ID when you pull the data. It's really silly the way they did it. They store the number of teams to display/page server side rather than client side.
|
Re: Retrieve data from TheBlueAlliance
Quote:
|
Re: Retrieve data from TheBlueAlliance
Quote:
|
| All times are GMT -5. The time now is 02:56. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi