Quote:
Originally Posted by Karthik
All you web ninjas out there, does anyone want to whip up a quick reference page that pulls in the following data in a pretty table:
1. Regional Name {And link to registered teams}
2. Regional Location
3. Regional Dates
4. Number of Registered Teams
5. Number of Spots Available
FIRST used to have a page like this that made for a great quick reference for those of us who like to follow registration season. It hasn't been around for a while, but it seems like this would be easy enough to create by someone who has a little bit of time.
|
This looks like it would be an easy addition to the existing frclinks interface. Right now you can enter queries to frclinks that are shortcuts to certain pages on usfirst.org. For example (see URLs below), entering 1 will redirect to 2, which redirects to 3. Or you can enter 2, which redirects to 3. 3 is the team list for MNDU2 (Northern Lights Regional).
Code:
1. http://frclinks.frclinks.com/e/mndu2
2. http://frclinks.frclinks.com/usfirst.org?url=https%3A%2F%2Fmy.usfirst.org%2Fmyarea%2Findex.lasso%3Fpage%3Dteamlist%26event_type%3DFRC%26sort_teams%3Dnumber%26year%3D2015%26event%3Dmndu2
3. https://my.usfirst.org/myarea/index.lasso?page=teamlist&event_type=FRC&sort_teams=number&year=2015&event=mndu2
For some reason, loading 3 directly always returns a blank page (literally a single newline). This has something to do with usfirst.org manages its sessions, but the frclinks redirect somehow takes care of this.
So we should be able to put any valid usfirst.org/.../index.lasso query in the url field of frclinks above. Right now frclinks has the shortcuts for team lists (/e/), awards (/e/a/), schedules (/e/s/), rankings (/e/r/), etc. but not for the details page (not sure why).
EDIT: So apparently what I did the first time worked because of the session I already had active... I still don't fully understand how usfirst.org sends data, but it appears that what I posted doesn't work. The event details query does not respond to event code, but rather to event id (eid) which I had to scrape from the event listing HTML. Also, you have to have an active session before making the request, or it says the event id is invalid. Anyone have a better idea how this all works?
But we can get this ourselves by using the stub
Code:
http://frclinks.frclinks.com/usfirst.org?url=https%3A%2F%2Fmy.usfirst.org%2Fmyarea%2Findex.lasso%3Fpage%3Devent_details%26event%3D
and putting our desired event code at the end (for example MNDU2) which will give the event details page for that event (including working links to the team list, awards, etc. pages).
So if you're curious about a particular events capacity, you can run that single http request instead of navigating through usfirst.org. Perhaps frclinks can add this as a shortcut option (such as /e/d/).
Perhaps I will build a site that queries all events and shows all the capacities in one table.