the-orange-alliance / toa-angular-old

🤖 A webapp for accessing data about the FIRST Tech Challenge
https://theorangealliance.org
MIT License
45 stars 31 forks source link

Need a way to read all events for this year for ftcstats #176

Closed johnnguyenboston closed 5 years ago

johnnguyenboston commented 5 years ago

I'm trying to get ftcstats going for this year, but the TOA API seems to have changed. Previously, I was able to get the list of events by looking up the events in each region, for example http://theorangealliance.org/api/events/region/AK, but that no longer seems to work. Do you know any way I can look up all events for this year?

ofekashery commented 5 years ago

To get all events for this year, call https://theorangealliance.org/api/event?season_key=1819. To filter by region, you need to run a local code. We don't have this feature yet.

johnnguyenboston commented 5 years ago

Thanks that works. It only shows only one event that's happened so far, which was in MS yesterday. There are also some meets going on. Is meet data not included in TOA?

ofekashery commented 5 years ago

We have added all the events for this season that registered in FIRST

johnnguyenboston commented 5 years ago

OK, thanks. I see them. It doesn't look like any have scores yet? Also, would it be possible to remove the rate limiting for my account? I'm getting this error:

requests.exceptions.ConnectionError: HTTPConnectionPool(host='theorangealliance.org', port=80): Max retries exceeded with url: /api/regions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x10fc95a90>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

johnnguyenboston commented 5 years ago

Actually it still doesn't look like meets are imported. Below is are all events currently being returned, grouped by event_type:

{u'RCMP': 29, u'SCRIMMAGE': 34, u'SPRQUAL': 5, u'QUAL': 138, u'WRLDCMP': 2, u'OTHER': 26}

Techno11 commented 5 years ago

@afera15 asked us (@ofekashery and me, the main retriever devs) to not import Meets. @afera15 would you like to comment?

afera15 commented 5 years ago

go ahead and put all events

johnnguyenboston commented 5 years ago

Thanks. In previous seasons, some states (Georgia, Oregon, CALA, among others) have relied on ftcstats for scouting based on meet performance, and their affiliate partners have actually emailed the meet results directly to me. It would be a lot easier if I can just tell them to send you the meet data so that I can grab it all from one place.