Go to Post I wonder if we sang songs to Bill Miller if that would get TIMS opened sooner, like the way it worked to wring game hints out of Dave Laverly. - rsisk [more]
Home
Go Back   Chief Delphi > Other > FIRST-related Organizations
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 23-07-2005, 09:53
Timothy D. Ginn's Avatar
Timothy D. Ginn Timothy D. Ginn is offline
I check here maybe once a year.
no team
 
Join Date: Apr 2003
Rookie Year: 2002
Location: Port Perry, ON. Canada
Posts: 247
Timothy D. Ginn is a name known to allTimothy D. Ginn is a name known to allTimothy D. Ginn is a name known to allTimothy D. Ginn is a name known to allTimothy D. Ginn is a name known to allTimothy D. Ginn is a name known to all
Send a message via ICQ to Timothy D. Ginn Send a message via AIM to Timothy D. Ginn Send a message via MSN to Timothy D. Ginn Send a message via Yahoo to Timothy D. Ginn
FIRST Blogs API

For those of you who don't know FIRST Blogs is an aggregation of public weblogs written by those affiliated with FIRST in some way (including alumni).

Anyway, I started to write an API for use by programmers who want to interface with the site; it's not fully developed and will probably increase from where it's at in the future (subscribe to this thread for updates).

Here's some sample code for interfacing with FIRST Blogs via the API:

PHP Code:
<?php

/*
 *  This is a demo client which connects to the FIRST Blogs
 *  API and retrieves a list of blogs with a given team number.
 *
 *  The docs for the PEAR XML_RPC are at:
 *    http://pear.php.net/manual/en/package.webservices.xml-rpc.php
 *
 *  Code originally written by Tim Ginn <tim@openfirst.org> - July 23, 2005
 */


// Include the PEAR XML_RPC Package
require_once 'XML/RPC.php';
require_once 
'XML/RPC/Server.php';

// Set and encode parameters for the query
//  First parameter: string containing the address to the homepage of your site
//              (or e-mail at which the author of a client may be contacted)
//  Second parameter: int containing the team number to lookup.
$params = array(new XML_RPC_Value('http://www.example.org''string'), new XML_RPC_Value(0'int'));
  
// Specify which function to use
$msg = new XML_RPC_Message('getbloginfobyteam'$params);

// Setup the connection to the FIRST Blogs server
$cli = new XML_RPC_Client('/api/''blog.openfirst.org');

// Debugging (uncomment to enable)
// $cli->setDebug(1);

// Query the FIRST Blogs server
$resp $cli->send($msg);

// Print out a response to the query
// (for most practical purposes you'd probably want to do something else)   
print_r($resp);

?>
Edit: I should probably also mention that team 0 is special in that it returns those who are no longer (or never were) affiliated with a particular team.
__________________
Alumni of FRC Team 1006
Former mentor of Full Lego Alchemist (FLL 5621) - Sempar School / Computing Students' Association of Queen's University

Last edited by Timothy D. Ginn : 23-07-2005 at 09:56.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SMTP C++ API Ryan M. Programming 1 23-09-2004 13:49
LiveJournals or other Blogs mistresshawk Chit-Chat 42 11-08-2003 20:11
Win32 API Port Connection Help Raven_Writer Programming 3 17-01-2003 14:23


All times are GMT -5. The time now is 03:53.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi