View Single Post
  #1   Spotlight this post!  
Unread 04-03-2010, 19:42
LukeS LukeS is offline
4272 mentor, 1024 alumnus
AKA: Luke Shumaker
FRC #4272
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Indianapolis, IN
Posts: 60
LukeS is an unknown quantity at this point
API for FMS twitter feed

I wrote this last night, and after seeing that it works today, figured I might share it.

This is a PHP API to grab the #FRCFMS Twitter feed, and parse it's data in an easy-to-access way.

The file is http://servb.ath.cx:3445/~luke/1024/frcfms/frcfms.php, get the source at http://servb.ath.cx:3445/~luke/1024/...ile=frcfms.php

Another file of interest is index.php, a sample use of this. adding ?team=XXXX will filter to only show a certain team. So, for example, I can see all of our team's matches with http://servb.ath.cx:3445/~luke/1024/....php?team=1024

load_frcfms() returns an array of objects that have the
  • $date, $event, $type, $match, $red, $blue
  • $r1, $r2, $r3, $rBonus, $rPenalties, $rGoals, $rGoalPen
  • $b1, $b2, $b3, $bBonus, $bPenalties, $bGoals, $bGoalPen
sub-variables for you to access. r/b1-3 are the teams involved, red/blue are the final scores.

I'll probably write up some real documentation eventually, but hopefully some of you find this useful.