3 if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
4 print "This script must be run from the command line\n";
8 // XXX: we should probably have some common source for this stuff
10 define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
11 define('STATUSNET', true);
13 require_once INSTALLDIR . '/lib/common.php';
15 class ActivityParseTests extends PHPUnit_Framework_TestCase
17 public function testExample1()
20 $dom = DOMDocument::loadXML($_example1);
21 $act = new Activity($dom->documentElement);
23 $this->assertFalse(empty($act));
25 $this->assertEquals(1243860840, $act->time);
26 $this->assertEquals(ActivityVerb::POST, $act->verb);
28 $this->assertFalse(empty($act->objects[0]));
29 $this->assertEquals('Punctuation Changeset', $act->objects[0]->title);
30 $this->assertEquals('http://versioncentral.example.org/activity/changeset', $act->objects[0]->type);
31 $this->assertEquals('Fixing punctuation because it makes it more readable.', $act->objects[0]->summary);
32 $this->assertEquals('tag:versioncentral.example.org,2009:/change/1643245', $act->objects[0]->id);
35 public function testExample3()
38 $dom = DOMDocument::loadXML($_example3);
40 $feed = $dom->documentElement;
42 $entries = $feed->getElementsByTagName('entry');
44 $entry = $entries->item(0);
46 $act = new Activity($entry, $feed);
48 $this->assertFalse(empty($act));
49 $this->assertEquals(1071340202, $act->time);
50 $this->assertEquals('http://example.org/2003/12/13/atom03.html', $act->link);
52 $this->assertEquals($act->verb, ActivityVerb::POST);
54 $this->assertFalse(empty($act->actor));
55 $this->assertEquals(ActivityObject::PERSON, $act->actor->type);
56 $this->assertEquals('John Doe', $act->actor->title);
57 $this->assertEquals('mailto:johndoe@example.com', $act->actor->id);
59 $this->assertFalse(empty($act->objects[0]));
60 $this->assertEquals(ActivityObject::NOTE, $act->objects[0]->type);
61 $this->assertEquals('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a', $act->objects[0]->id);
62 $this->assertEquals('Atom-Powered Robots Run Amok', $act->objects[0]->title);
63 $this->assertEquals('Some text.', $act->objects[0]->summary);
64 $this->assertEquals('http://example.org/2003/12/13/atom03.html', $act->objects[0]->link);
66 $this->assertFalse(empty($act->context));
68 $this->assertTrue(empty($act->target));
70 $this->assertEquals($act->entry, $entry);
71 $this->assertEquals($act->feed, $feed);
74 public function testExample4()
77 $dom = DOMDocument::loadXML($_example4);
79 $entry = $dom->documentElement;
81 $act = new Activity($entry);
83 $this->assertFalse(empty($act));
84 $this->assertEquals(1266547958, $act->time);
85 $this->assertEquals('http://example.net/notice/14', $act->link);
87 $this->assertFalse(empty($act->context));
88 $this->assertEquals('http://example.net/notice/12', $act->context->replyToID);
89 $this->assertEquals('http://example.net/notice/12', $act->context->replyToUrl);
90 $this->assertEquals('http://example.net/conversation/11', $act->context->conversation);
91 $this->assertEquals(array('http://example.net/user/1'), $act->context->attention);
93 $this->assertFalse(empty($act->objects[0]));
94 $this->assertEquals($act->objects[0]->content,
95 '@<span class="vcard"><a href="http://example.net/user/1" class="url"><span class="fn nickname">evan</span></a></span> now is the time for all good men to come to the aid of their country. #<span class="tag"><a href="http://example.net/tag/thetime" rel="tag">thetime</a></span>');
97 $this->assertFalse(empty($act->actor));
100 public function testExample5()
103 $dom = DOMDocument::loadXML($_example5);
105 $feed = $dom->documentElement;
107 // @todo Test feed elements
109 $entries = $feed->getElementsByTagName('entry');
110 $entry = $entries->item(0);
112 $act = new Activity($entry, $feed);
115 $this->assertEquals($act->verb, ActivityVerb::POST);
116 $this->assertFalse(empty($act->context));
118 // Actor w/Portable Contacts stuff
119 $this->assertFalse(empty($act->actor));
120 $this->assertEquals($act->actor->type, ActivityObject::PERSON);
121 $this->assertEquals($act->actor->title, 'Test User');
122 $this->assertEquals($act->actor->id, 'http://example.net/mysite/user/3');
123 $this->assertEquals($act->actor->link, 'http://example.net/mysite/testuser');
125 $avatars = $act->actor->avatarLinks;
129 'http://example.net/mysite/avatar/3-96-20100224004207.jpeg'
132 $this->assertEquals($act->actor->displayName, 'Test User');
134 $poco = $act->actor->poco;
135 $this->assertEquals($poco->preferredUsername, 'testuser');
136 $this->assertEquals($poco->address->formatted, 'San Francisco, CA');
137 $this->assertEquals($poco->urls[0]->type, 'homepage');
138 $this->assertEquals($poco->urls[0]->value, 'http://example.com/blog.html');
139 $this->assertEquals($poco->urls[0]->primary, 'true');
140 $this->assertEquals($act->actor->geopoint, '37.7749295 -122.4194155');
143 public function testExample6()
147 $dom = DOMDocument::loadXML($_example6);
149 $rss = $dom->documentElement;
151 $channels = $dom->getElementsByTagName('channel');
153 $channel = $channels->item(0);
155 $items = $channel->getElementsByTagName('item');
157 $item = $items->item(0);
159 $act = new Activity($item, $channel);
161 $this->assertEquals($act->verb, ActivityVerb::POST);
163 $this->assertEquals($act->id, 'http://en.blog.wordpress.com/?p=3857');
164 $this->assertEquals($act->link, 'http://en.blog.wordpress.com/2010/03/03/rub-a-dub-dub-in-the-pubsubhubbub/');
165 $this->assertEquals($act->title, 'Rub-a-Dub-Dub in the PubSubHubbub');
166 $this->assertEquals($act->time, 1267634892);
168 $actor = $act->actor;
170 $this->assertFalse(empty($actor));
171 $this->assertEquals($actor->title, "Joseph Scott");
174 public function testExample7()
178 $dom = DOMDocument::loadXML($_example7);
180 $rss = $dom->documentElement;
182 $channels = $dom->getElementsByTagName('channel');
184 $channel = $channels->item(0);
186 $items = $channel->getElementsByTagName('item');
188 $item = $items->item(0);
190 $act = new Activity($item, $channel);
192 $this->assertEquals(ActivityVerb::POST, $act->verb);
193 $this->assertEquals('http://evanpro.posterous.com/checking-out-captain-bones', $act->link);
194 $this->assertEquals('http://evanpro.posterous.com/checking-out-captain-bones', $act->id);
195 $this->assertEquals('Checking out captain bones', $act->title);
196 $this->assertEquals(1269095551, $act->time);
198 $actor = $act->actor;
200 $this->assertEquals(ActivityObject::PERSON, $actor->type);
201 $this->assertEquals('http://posterous.com/people/3sDslhaepotz', $actor->id);
202 $this->assertEquals('Evan Prodromou', $actor->title);
203 $this->assertNull($actor->summary);
204 $this->assertNull($actor->content);
205 $this->assertEquals('http://posterous.com/people/3sDslhaepotz', $actor->link);
206 $this->assertNull($actor->source);
207 $this->assertTrue(is_array($actor->avatarLinks));
208 $this->assertEquals(1, count($actor->avatarLinks));
209 $this->assertEquals('http://files.posterous.com/user_profile_pics/480326/2009-08-05-142447.jpg',
210 $actor->avatarLinks[0]->url);
211 $this->assertNotNull($actor->poco);
212 $this->assertEquals('evanpro', $actor->poco->preferredUsername);
213 $this->assertEquals('Evan Prodromou', $actor->poco->displayName);
214 $this->assertNull($actor->poco->note);
215 $this->assertNull($actor->poco->address);
216 $this->assertEquals(0, count($actor->poco->urls));
219 // Media test - cliqset
220 public function testExample8()
223 $dom = DOMDocument::loadXML($_example8);
225 $feed = $dom->documentElement;
227 $entries = $feed->getElementsByTagName('entry');
229 $entry = $entries->item(0);
231 $act = new Activity($entry, $feed);
233 $this->assertFalse(empty($act));
234 $this->assertEquals($act->time, 1269221753);
235 $this->assertEquals($act->verb, ActivityVerb::POST);
236 $this->assertEquals($act->summary, 'zcopley posted 5 photos on Flickr');
238 $this->assertFalse(empty($act->objects));
239 $this->assertEquals(sizeof($act->objects), 5);
241 $this->assertEquals($act->objects[0]->type, ActivityObject::PHOTO);
242 $this->assertEquals($act->objects[0]->title, 'IMG_1368');
243 $this->assertNull($act->objects[0]->description);
245 $act->objects[0]->thumbnail,
246 'http://media.cliqset.com/6f6fbee9d7dfbffc73b6ef626275eb5f_thumb.jpg'
249 $act->objects[0]->link,
250 'http://www.flickr.com/photos/zcopley/4452933806/'
253 $this->assertEquals($act->objects[1]->type, ActivityObject::PHOTO);
254 $this->assertEquals($act->objects[1]->title, 'IMG_1365');
255 $this->assertNull($act->objects[1]->description);
257 $act->objects[1]->thumbnail,
258 'http://media.cliqset.com/b8f3932cd0bba1b27f7c8b3ef986915e_thumb.jpg'
261 $act->objects[1]->link,
262 'http://www.flickr.com/photos/zcopley/4442630390/'
265 $this->assertEquals($act->objects[2]->type, ActivityObject::PHOTO);
266 $this->assertEquals($act->objects[2]->title, 'Classic');
268 $act->objects[2]->description,
269 '-Powered by pikchur.com/n0u'
272 $act->objects[2]->thumbnail,
273 'http://media.cliqset.com/fc54c15f850b7a9a8efa644087a48c91_thumb.jpg'
276 $act->objects[2]->link,
277 'http://www.flickr.com/photos/zcopley/4430754103/'
280 $this->assertEquals($act->objects[3]->type, ActivityObject::PHOTO);
281 $this->assertEquals($act->objects[3]->title, 'IMG_1363');
282 $this->assertNull($act->objects[3]->description);
285 $act->objects[3]->thumbnail,
286 'http://media.cliqset.com/4b1d307c9217e2114391a8b229d612cb_thumb.jpg'
289 $act->objects[3]->link,
290 'http://www.flickr.com/photos/zcopley/4416969717/'
293 $this->assertEquals($act->objects[4]->type, ActivityObject::PHOTO);
294 $this->assertEquals($act->objects[4]->title, 'IMG_1361');
295 $this->assertNull($act->objects[4]->description);
298 $act->objects[4]->thumbnail,
299 'http://media.cliqset.com/23d9b4b96b286e0347d36052f22f6e60_thumb.jpg'
302 $act->objects[4]->link,
303 'http://www.flickr.com/photos/zcopley/4417734232/'
310 $_example1 = <<<EXAMPLE1
311 <?xml version='1.0' encoding='UTF-8'?>
312 <entry xmlns='http://www.w3.org/2005/Atom' xmlns:activity='http://activitystrea.ms/spec/1.0/'>
313 <id>tag:versioncentral.example.org,2009:/commit/1643245</id>
314 <published>2009-06-01T12:54:00Z</published>
315 <title>Geraldine committed a change to yate</title>
316 <content type="xhtml">Geraldine just committed a change to yate on VersionCentral</content>
317 <link rel="alternate" type="text/html"
318 href="http://versioncentral.example.org/geraldine/yate/commit/1643245" />
319 <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
320 <activity:verb>http://versioncentral.example.org/activity/commit</activity:verb>
322 <activity:object-type>http://versioncentral.example.org/activity/changeset</activity:object-type>
323 <id>tag:versioncentral.example.org,2009:/change/1643245</id>
324 <title>Punctuation Changeset</title>
325 <summary>Fixing punctuation because it makes it more readable.</summary>
326 <link rel="alternate" type="text/html" href="..." />
331 $_example2 = <<<EXAMPLE2
332 <?xml version='1.0' encoding='UTF-8'?>
333 <entry xmlns='http://www.w3.org/2005/Atom' xmlns:activity='http://activitystrea.ms/spec/1.0/'>
334 <id>tag:photopanic.example.com,2008:activity01</id>
335 <title>Geraldine posted a Photo on PhotoPanic</title>
336 <published>2008-11-02T15:29:00Z</published>
337 <link rel="alternate" type="text/html" href="/geraldine/activities/1" />
339 http://activitystrea.ms/schema/1.0/post
342 <id>tag:photopanic.example.com,2008:photo01</id>
343 <title>My Cat</title>
344 <published>2008-11-02T15:29:00Z</published>
345 <link rel="alternate" type="text/html" href="/geraldine/photos/1" />
346 <activity:object-type>
347 tag:atomactivity.example.com,2008:photo
348 </activity:object-type>
350 <title>Geraldine's Photos</title>
351 <link rel="self" type="application/atom+xml" href="/geraldine/photofeed.xml" />
352 <link rel="alternate" type="text/html" href="/geraldine/" />
355 <content type="html">
356 <p>Geraldine posted a Photo on PhotoPanic</p>
357 <img src="/geraldine/photo1.jpg">
362 $_example3 = <<<EXAMPLE3
363 <?xml version="1.0" encoding="utf-8"?>
365 <feed xmlns="http://www.w3.org/2005/Atom">
367 <title>Example Feed</title>
368 <subtitle>A subtitle.</subtitle>
369 <link href="http://example.org/feed/" rel="self" />
370 <link href="http://example.org/" />
371 <id>urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6</id>
372 <updated>2003-12-13T18:30:02Z</updated>
374 <name>John Doe</name>
375 <email>johndoe@example.com</email>
379 <title>Atom-Powered Robots Run Amok</title>
380 <link href="http://example.org/2003/12/13/atom03" />
381 <link rel="alternate" type="text/html" href="http://example.org/2003/12/13/atom03.html"/>
382 <link rel="edit" href="http://example.org/2003/12/13/atom03/edit"/>
383 <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
384 <updated>2003-12-13T18:30:02Z</updated>
385 <summary>Some text.</summary>
391 $_example4 = <<<EXAMPLE4
392 <?xml version='1.0' encoding='UTF-8'?>
393 <entry xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:georss="http://www.georss.org/georss" xmlns:activity="http://activitystrea.ms/spec/1.0/" xmlns:ostatus="http://ostatus.org/schema/1.0">
394 <title>@evan now is the time for all good men to come to the aid of their country. #thetime</title>
395 <summary>@evan now is the time for all good men to come to the aid of their country. #thetime</summary>
398 <uri>http://example.net/user/2</uri>
401 <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
402 <id>http://example.net/user/2</id>
404 <link type="image/png" rel="avatar" href="http://example.net/theme/identica/default-avatar-profile.png"></link>
406 <link rel="alternate" type="text/html" href="http://example.net/notice/14"/>
407 <id>http://example.net/notice/14</id>
408 <published>2010-02-19T02:52:38+00:00</published>
409 <updated>2010-02-19T02:52:38+00:00</updated>
410 <link rel="related" href="http://example.net/notice/12"/>
411 <thr:in-reply-to ref="http://example.net/notice/12" href="http://example.net/notice/12"></thr:in-reply-to>
412 <link rel="ostatus:conversation" href="http://example.net/conversation/11"/>
413 <link rel="ostatus:attention" href="http://example.net/user/1"/>
414 <content type="html">@<span class="vcard"><a href="http://example.net/user/1" class="url"><span class="fn nickname">evan</span></a></span> now is the time for all good men to come to the aid of their country. #<span class="tag"><a href="http://example.net/tag/thetime" rel="tag">thetime</a></span></content>
415 <category term="thetime"></category>
419 $_example5 = <<<EXAMPLE5
420 <?xml version="1.0" encoding="UTF-8"?>
421 <feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:georss="http://www.georss.org/georss" xmlns:activity="http://activitystrea.ms/spec/1.0/" xmlns:poco="http://portablecontacts.net/spec/1.0" xmlns:ostatus="http://ostatus.org/schema/1.0">
423 <title>testuser timeline</title>
424 <subtitle>Updates from testuser on Zach Dev!</subtitle>
425 <logo>http://example.net/mysite/avatar/3-96-20100224004207.jpeg</logo>
426 <updated>2010-02-24T06:38:49+00:00</updated>
428 <name>testuser</name>
429 <uri>http://example.net/mysite/user/3</uri>
432 <link href="http://example.net/mysite/testuser" rel="alternate" type="text/html"/>
433 <link href="http://example.net/mysite/api/statuses/user_timeline/3.atom" rel="self" type="application/atom+xml"/>
434 <link href="http://example.net/mysite/main/sup#3" rel="http://api.friendfeed.com/2008/03#sup" type="application/json"/>
435 <link href="http://example.net/mysite/main/push/hub" rel="hub"/>
436 <link href="http://example.net/mysite/main/salmon/user/3" rel="salmon"/>
438 <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
439 <id>http://example.net/mysite/user/3</id>
440 <title>Test User</title>
441 <link rel="alternate" type="text/html" href="http://example.net/mysite/testuser"/>
442 <link type="image/jpeg" rel="avatar" href="http://example.net/mysite/avatar/3-96-20100224004207.jpeg"/>
443 <georss:point>37.7749295 -122.4194155</georss:point>
445 <poco:preferredUsername>testuser</poco:preferredUsername>
446 <poco:displayName>Test User</poco:displayName>
447 <poco:note>Just another test user.</poco:note>
449 <poco:formatted>San Francisco, CA</poco:formatted>
452 <poco:type>homepage</poco:type>
453 <poco:value>http://example.com/blog.html</poco:value>
454 <poco:primary>true</poco:primary>
459 <title>Hey man, is that Freedom Code?! #freedom #hippy</title>
460 <summary>Hey man, is that Freedom Code?! #freedom #hippy</summary>
462 <name>testuser</name>
463 <uri>http://example.net/mysite/user/3</uri>
466 <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
467 <id>http://example.net/mysite/user/3</id>
468 <title>Test User</title>
469 <link rel="alternate" type="text/html" href="http://example.net/mysite/testuser"/>
470 <link type="image/jpeg" rel="avatar" href="http://example.net/mysite/avatar/3-96-20100224004207.jpeg"/>
471 <georss:point>37.7749295 -122.4194155</georss:point>
473 <poco:preferredUsername>testuser</poco:preferredUsername>
474 <poco:displayName>Test User</poco:displayName>
475 <poco:note>Just another test user.</poco:note>
477 <poco:formatted>San Francisco, CA</poco:formatted>
480 <poco:type>homepage</poco:type>
481 <poco:value>http://example.com/blog.html</poco:value>
482 <poco:primary>true</poco:primary>
486 <link rel="alternate" type="text/html" href="http://example.net/mysite/notice/7"/>
487 <id>http://example.net/mysite/notice/7</id>
488 <published>2010-02-24T00:53:06+00:00</published>
489 <updated>2010-02-24T00:53:06+00:00</updated>
490 <link rel="ostatus:conversation" href="http://example.net/mysite/conversation/7"/>
491 <content type="html">Hey man, is that Freedom Code?! #<span class="tag"><a href="http://example.net/mysite/tag/freedom" rel="tag">freedom</a></span> #<span class="tag"><a href="http://example.net/mysite/tag/hippy" rel="tag">hippy</a></span></content>
492 <georss:point>37.8313160 -122.2852473</georss:point>
498 $_example6 = <<<EXAMPLE6
499 <?xml version="1.0" encoding="UTF-8"?>
501 xmlns:content="http://purl.org/rss/1.0/modules/content/"
502 xmlns:wfw="http://wellformedweb.org/CommentAPI/"
503 xmlns:dc="http://purl.org/dc/elements/1.1/"
504 xmlns:atom="http://www.w3.org/2005/Atom"
505 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
506 xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
507 xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
511 <title>WordPress.com News</title>
512 <atom:link href="http://en.blog.wordpress.com/feed/" rel="self" type="application/rss+xml" />
513 <link>http://en.blog.wordpress.com</link>
514 <description>The latest news on WordPress.com and the WordPress community.</description>
515 <lastBuildDate>Thu, 18 Mar 2010 23:25:35 +0000</lastBuildDate>
517 <generator>http://wordpress.com/</generator>
518 <language>en</language>
519 <sy:updatePeriod>hourly</sy:updatePeriod>
520 <sy:updateFrequency>1</sy:updateFrequency>
521 <cloud domain='en.blog.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
523 <url>http://www.gravatar.com/blavatar/e6392390e3bcfadff3671c5a5653d95b?s=96&d=http://s2.wp.com/i/buttonw-com.png</url>
524 <title>WordPress.com News</title>
525 <link>http://en.blog.wordpress.com</link>
527 <atom:link rel="search" type="application/opensearchdescription+xml" href="http://en.blog.wordpress.com/osd.xml" title="WordPress.com News" />
528 <atom:link rel='hub' href='http://en.blog.wordpress.com/?pushpress=hub'/>
531 <title>Rub-a-Dub-Dub in the PubSubHubbub</title>
532 <link>http://en.blog.wordpress.com/2010/03/03/rub-a-dub-dub-in-the-pubsubhubbub/</link>
533 <comments>http://en.blog.wordpress.com/2010/03/03/rub-a-dub-dub-in-the-pubsubhubbub/#comments</comments>
534 <pubDate>Wed, 03 Mar 2010 16:48:12 +0000</pubDate>
535 <dc:creator>Joseph Scott</dc:creator>
537 <category><![CDATA[Feeds]]></category>
538 <category><![CDATA[atom]]></category>
539 <category><![CDATA[pubsubhubbub]]></category>
540 <category><![CDATA[rss]]></category>
542 <guid isPermaLink="false">http://en.blog.wordpress.com/?p=3857</guid>
543 <description><![CDATA[From the tongue twisting name department we welcome PubSubHubbub, or as some people have shortened it to: PuSH. Like rssCloud, PuSH is a way for services that subscribe to updates from your blog (think Google Reader, Bloglines or Netvibes) to get updates even faster. In a nutshell, instead of having to periodically ask [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=en.blog.wordpress.com&blog=3584907&post=3857&subd=en.blog&ref=&feed=1" />]]></description>
544 <content:encoded><![CDATA[<p>From the tongue twisting name department we welcome <a href="http://code.google.com/p/pubsubhubbub/">PubSubHubbub</a>, or as some people have shortened it to: PuSH. Like <a href="http://en.blog.wordpress.com/2009/09/07/rss-in-the-clouds/">rssCloud</a>, PuSH is a way for services that subscribe to updates from your blog (think Google Reader, Bloglines or Netvibes) to get updates even faster. In a nutshell, instead of having to periodically ask your blog if there are any updates they can now register to automatically receive updates each time you publish new content. In most cases these updates are sent out within a second or two of when you hit the publish button.</p>
545 <p>Today we’ve turned on PuSH support for the more than 10.5 million blogs on WordPress.com. There’s nothing to configure, it’s working right now behind the scenes to help others keep up to date with your posts.</p>
546 <p>For those using the WordPress.org software we are releasing a new PuSH plugin: <a href="http://wordpress.org/extend/plugins/pushpress/">PuSHPress</a>. This plugin differs from the current PuSH related plugins by including a built-in hub.</p>
547 <p>For more PuSH related reading check out the <a href="http://code.google.com/p/pubsubhubbub/">PubSubHubbub project site</a> and <a href="http://groups.google.com/group/pubsubhubbub?pli=1">Google Group</a>. And if you really want to geek out there’s always the <a href="http://pubsubhubbub.googlecode.com/svn/trunk/pubsubhubbub-core-0.3.html">PubSubHubbub Spec</a> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
548 <br /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/en.blog.wordpress.com/3857/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/en.blog.wordpress.com/3857/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/en.blog.wordpress.com/3857/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/en.blog.wordpress.com/3857/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/en.blog.wordpress.com/3857/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/en.blog.wordpress.com/3857/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/en.blog.wordpress.com/3857/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/en.blog.wordpress.com/3857/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/en.blog.wordpress.com/3857/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/en.blog.wordpress.com/3857/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=en.blog.wordpress.com&blog=3584907&post=3857&subd=en.blog&ref=&feed=1" />]]></content:encoded>
549 <wfw:commentRss>http://en.blog.wordpress.com/2010/03/03/rub-a-dub-dub-in-the-pubsubhubbub/feed/</wfw:commentRss>
551 <slash:comments>96</slash:comments>
553 <media:content url="http://1.gravatar.com/avatar/582b66ad5ae1b69c7601a990cb9a661a?s=96&d=identicon" medium="image">
554 <media:title type="html">josephscott</media:title>
561 $_example7 = <<<EXAMPLE7
562 <?xml version="1.0" encoding="UTF-8"?>
563 <rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:posterous="http://posterous.com/help/rss/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/">
565 <title>evanpro's posterous</title>
566 <link>http://evanpro.posterous.com</link>
567 <description>Most recent posts at evanpro's posterous</description>
568 <generator>posterous.com</generator>
569 <link type="application/json" xmlns="http://www.w3.org/2005/Atom" rel="http://api.friendfeed.com/2008/03#sup" href="http://posterous.com/api/sup_update#56bcc5eb7"/>
570 <atom:link rel="self" href="http://evanpro.posterous.com/rss.xml"/>
571 <atom:link rel="hub" href="http://posterous.superfeedr.com"/>
573 <pubDate>Sat, 20 Mar 2010 07:32:31 -0700</pubDate>
574 <title>Checking out captain bones</title>
575 <link>http://evanpro.posterous.com/checking-out-captain-bones</link>
576 <guid>http://evanpro.posterous.com/checking-out-captain-bones</guid>
583 <p><a href="http://evanpro.posterous.com/checking-out-captain-bones">Permalink</a>
585 | <a href="http://evanpro.posterous.com/checking-out-captain-bones#comment">Leave a comment »</a>
590 <posterous:userImage>http://files.posterous.com/user_profile_pics/480326/2009-08-05-142447.jpg</posterous:userImage>
591 <posterous:profileUrl>http://posterous.com/people/3sDslhaepotz</posterous:profileUrl>
592 <posterous:firstName>Evan</posterous:firstName>
593 <posterous:lastnNme>Prodromou</posterous:lastnNme>
594 <posterous:nickName>evanpro</posterous:nickName>
595 <posterous:displayName>Evan Prodromou</posterous:displayName>
602 $_example8 = <<<EXAMPLE8
603 <?xml version="1.0"?>
604 <feed xmlns="http://www.w3.org/2005/Atom">
605 <link href="http://pubsubhubbub.appspot.com/" rel="hub"/>
606 <title type="text">Activity Stream for: zcopley</title>
607 <id>http://cliqset.com/feed/atom?uid=zcopley</id>
608 <entry xmlns:service="http://activitystrea.ms/service-provider" xmlns:activity="http://activitystrea.ms/spec/1.0/">
609 <thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total>
610 <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
611 <published>2010-03-22T01:35:53.000Z</published>
614 <uri>http://flickr.com</uri>
615 <icon>http://cliqset-services.s3.amazonaws.com/flickr.png</icon>
618 <activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
619 <title type="text">IMG_1368</title>
620 <link type="image/jpeg" rel="preview" href="http://media.cliqset.com/6f6fbee9d7dfbffc73b6ef626275eb5f_thumb.jpg"/>
621 <link rel="alternate" type="text/html" href="http://www.flickr.com/photos/zcopley/4452933806/"/>
624 <activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
625 <title type="text">IMG_1365</title>
626 <link type="image/jpeg" rel="preview" href="http://media.cliqset.com/b8f3932cd0bba1b27f7c8b3ef986915e_thumb.jpg"/>
627 <link rel="alternate" type="text/html" href="http://www.flickr.com/photos/zcopley/4442630390/"/>
629 <activity:object xmlns:media="http://purl.org/syndication/atommedia">
630 <activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
631 <title type="text">Classic</title>
632 <link type="image/jpeg" rel="preview" href="http://media.cliqset.com/fc54c15f850b7a9a8efa644087a48c91_thumb.jpg"/>
633 <link rel="alternate" type="text/html" href="http://www.flickr.com/photos/zcopley/4430754103/"/>
634 <media:description type="text">-Powered by pikchur.com/n0u</media:description>
637 <activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
638 <title type="text">IMG_1363</title>
639 <link type="image/jpeg" rel="preview" href="http://media.cliqset.com/4b1d307c9217e2114391a8b229d612cb_thumb.jpg"/>
640 <link rel="alternate" type="text/html" href="http://www.flickr.com/photos/zcopley/4416969717/"/>
643 <activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
644 <title type="text">IMG_1361</title>
645 <link type="image/jpeg" rel="preview" href="http://media.cliqset.com/23d9b4b96b286e0347d36052f22f6e60_thumb.jpg"/>
646 <link rel="alternate" type="text/html" href="http://www.flickr.com/photos/zcopley/4417734232/"/>
648 <title type="text">zcopley posted some photos on Flickr</title>
649 <summary type="text">zcopley posted 5 photos on Flickr</summary>
650 <category scheme="http://schemas.cliqset.com/activity/categories/1.0" term="PhotoPosted" label="Photo Posted"/>
651 <updated>2010-03-22T20:46:42.778Z</updated>
652 <id>tag:cliqset.com,2010-03-22:/user/zcopley/SVgAZubGhtAnSAee</id>
653 <link href="http://cliqset.com/user/zcopley/SVgAZubGhtAnSAee" type="text/xhtml" rel="alternate" title="zcopley posted some photos on Flickr"/>
656 <uri>http://cliqset.com/user/zcopley</uri>
658 <activity:actor xmlns:poco="http://portablecontacts.net/spec/1.0">
659 <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
662 <poco:givenName>Zach</poco:givenName>
663 <poco:familyName>Copley</poco:familyName>
665 <link xmlns:media="http://purl.org/syndication/atommedia" type="image/png" rel="avatar" href="http://dynamic.cliqset.com/avatar/zcopley?s=80" media:height="80" media:width="80"/>
666 <link xmlns:media="http://purl.org/syndication/atommedia" type="image/png" rel="avatar" href="http://dynamic.cliqset.com/avatar/zcopley?s=120" media:height="120" media:width="120"/>
667 <link xmlns:media="http://purl.org/syndication/atommedia" type="image/png" rel="avatar" href="http://dynamic.cliqset.com/avatar/zcopley?s=200" media:height="200" media:width="200"/>
673 $_example9 = <<<EXAMPLE9
674 <?xml version="1.0" encoding="utf-8"?>
675 <feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:media="http://search.yahoo.com/mrss" xmlns:activity="http://activitystrea.ms/spec/1.0/">
676 <link rel="self" type="application/atom+xml" href="http://buzz.googleapis.com/feeds/117848251937215158042/public/posted"/>
677 <link rel="hub" href="http://pubsubhubbub.appspot.com/"/>
678 <title type="text">Google Buzz</title>
679 <updated>2010-03-22T01:55:53.596Z</updated>
680 <id>tag:google.com,2009:buzz-feed/public/posted/117848251937215158042</id>
681 <generator>Google - Google Buzz</generator>
683 <title type="html">Buzz by Zach Copley from Flickr</title>
684 <summary type="text">IMG_1366</summary>
685 <published>2010-03-18T04:29:23.000Z</published>
686 <updated>2010-03-18T05:14:03.325Z</updated>
687 <id>tag:google.com,2009:buzz/z12zwdhxowq2d13q204cjr04kzu0cns5gh0</id>
688 <link rel="alternate" type="text/html" href="http://www.google.com/buzz/117848251937215158042/ZU7b6mHJEmC/IMG-1366"/>
690 <name>Zach Copley</name>
691 <uri>http://www.google.com/profiles/zcopley</uri>
693 <content type="html"><div>IMG_1366</div></content>
694 <link rel="enclosure" href="http://www.flickr.com/photos/22823034@N00/4442630700" type="image/jpeg" title="IMG_1366"/>
695 <media:content url="http://www.flickr.com/photos/22823034@N00/4442630700" type="image/jpeg" medium="image">
696 <media:title>IMG_1366</media:title>
697 <media:player url="http://farm5.static.flickr.com/4053/4442630700_980b19a1a6_o.jpg" height="1600" width="1200"/>
699 <link rel="enclosure" href="http://www.flickr.com/photos/22823034@N00/4442630390" type="image/jpeg" title="IMG_1365"/>
700 <media:content url="http://www.flickr.com/photos/22823034@N00/4442630390" type="image/jpeg" medium="image">
701 <media:title>IMG_1365</media:title>
702 <media:player url="http://farm5.static.flickr.com/4043/4442630390_62da5560ae_o.jpg" height="1200" width="1600"/>
704 <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
706 <activity:object-type>http://activitystrea.ms/schema/1.0/photo</activity:object-type>
707 <id>tag:google.com,2009:buzz/z12zwdhxowq2d13q204cjr04kzu0cns5gh0</id>
708 <title>Buzz by Zach Copley from Flickr</title>
709 <content type="html"><div>IMG_1366</div></content>
710 <link rel="enclosure" href="http://www.flickr.com/photos/22823034@N00/4442630700" type="image/jpeg" title="IMG_1366"/>
711 <link rel="enclosure" href="http://www.flickr.com/photos/22823034@N00/4442630390" type="image/jpeg" title="IMG_1365"/>
713 <link rel="replies" type="application/atom+xml" href="http://buzz.googleapis.com/feeds/117848251937215158042/comments/z12zwdhxowq2d13q204cjr04kzu0cns5gh0" thr:count="0"/>
714 <thr:total>0</thr:total>