![]() |
XML of the FIRST Q & A system
Hey all...
Intrested in seeing xml data from the FIRST Q & A system?? Check out http://usfirst.firstsn.org/xml/qa.php You can use the following queries in your url to access different info. The queries are: section=[Section] date=[Date] mmddyyyy=[(MM/DD/YYYY)] search=[Search] status=[Status] skip=[offset] **NOTE: MAX 25 DISPLAY** An example url would be: http://usfirst.firstsn.org/xml/qa.ph...tatus=answered Take a look at the actual Q & A page to see what are the possible values you can enter for each of the fields. Also, just to let anyone know, this script parses the FIRST site directly on every call so you'll be guarenteed fresh data. If anyone has any questions's or actually finds a good way to use this let me know. ;) Jack |
Re: XML of the FIRST Q & A system
Quote:
|
Re: XML of the FIRST Q & A system
As a side note, I'd like to register my disappointment with this year's Q&A system. Some of the best engineers in the world can't do better than this? Not only is the page cluttered and hard to read, but the questions can't be sorted chronologically so you can't see what has changed since the last time you have been there. Furthermore--speaking as my team's official Q&A bottleneck--I have not been emailed a notice that my question has been answered a single time as of yet, and three of my questions have been answered. This is obviously at odds with the Q&A login page.
*shakes head in disgust* $@#$@#$@#$@#. --Petey |
Re: XML of the FIRST Q & A system
I'll add this to the portal if anybody thinks it would be a good thing.
Anybody got any ideas on what I should add, if any? (answered, new questions, etc) |
Re: XML of the FIRST Q & A system
Newest five (or ten, whatever you want) answered questions.
|
Re: XML of the FIRST Q & A system
It would be great if you could include, say, the latest 5 asked questions and the latest 10 answered questions.
Brandon, do you think you'd be interested in making your little inclusion script open source if the people who used it on their site gave CD (and you) the credit for it? --Petey |
Re: XML of the FIRST Q & A system
I'll add the 5 most recently answered questions.
As for making it open source, I'll see what I have when I'm done. I'm not sure how much of it will be vB3-specific. |
Re: XML of the FIRST Q & A system
Quote:
I'll do whatever i need to do to fix that & see if i can get the page to load a lot faster. I might scarcifice parsing the FIRST page *every* load for the trade off of a better sorting system. I'll give yall an update later. |
Re: XML of the FIRST Q & A system
Hey~
Well.. I updated http://usfirst.firstsn.org/xml/qa.php As of now, it'll run a *ton* faster. The only downside to all of this is that the Q & A's will only be updated from the FIRST site every 15-30 min. SO.. While it won't be totally correct minute-to-minute, it'll be pretty close. Here are the new values you can pass in the URL. section=[This works just like the FIRST one. Passing 3 will return everything in and below section 3 such as 3.1, 3.1.1, etc.. Passing 3.1 will return things in 3.1 and below such as 3.1.1 and 3.1.2 BUT NOT 3.2] date=[asc/desc] - Note: This is just an order by statement. desc will return the newest q&a's first, asc will return the oldest first status=[answered/unanswered].. yup start=[offset] - The script will only return a max of 30 records at a time. Start can be used to offset the beginning to start at like record 30 instead of record 0. SO.. An example would be: http://usfirst.firstsn.org/xml/qa.ph...s=unansw ered If you have any questions feel free to ask. Hope this helps everyone! Jack |
Re: XML of the FIRST Q & A system
Thanks Jack!
Hmm...now, how to import them onto a page and organize them so they're not a bundle of gibberish. --Petey |
Re: XML of the FIRST Q & A system
hey.
Just to let ya all know.. The cron now works. That means that the xml data that you pull will be updated from the USFIRST site every 15 minutes. Also.. If you're looking for an easy way to display a link directly to a specific Q&A, you can use... http://my.usfirst.org/frc/qas/FMPro?...ind=&-token.3= Set -token.3= Like the first 75 chars of the question or something. That will then search the Q&A's for whatever you put as -token.3 As long as you have enough of the question so that there is only one Q&A that matches it, you'll be good. Maybe I'll get around to posting some code to parse the xml.. i dunno :) Jack |
Re: XML of the FIRST Q & A system
Grr to usfirst.
Well.. it appears that first played a bit with the Q&A page. Anyways.. the long and short of it was that it threw off the parser and caused it to not end correctly. Anywho.. by the time i saw something was wrong, instead of 175 records in the database, there were over a million. :) So.. for now, i've stopped the parsing. I don't want another occurance of this showing up again. I might remake this again in a few weeks when first has figured out the final source for the page. Jack |
| All times are GMT -5. The time now is 15:26. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi