Ejemplo n.º 1
0
<?php

require '../src/coreylib.php';
$mashup = new clMashup('channel/item', 'pubDate', array('http://feeds.feedburner.com/nettuts', 'http://feeds2.feedburner.com/TheWhyAndTheHow', 'http://feeds.feedburner.com/37signals/beMH'));
$mashup->parse();
$mashup->info();
$mashup->sort();
?>


<ul>
<?php 
foreach ($mashup as $item) {
    ?>
	<li><?php 
    echo $item->get('pubDate');
    ?>
: <?php 
    echo $item->get('title');
    ?>
<br />
		<a href="<?php 
    echo $item->get('link');
    ?>
"><?php 
    echo $item->get('link');
    ?>
</a></li>
<?php 
}
?>
Ejemplo n.º 2
0
<?php

error_reporting(E_ALL);
ini_set('display_errors', true);
require_once "../src/coreylib.php";
clAPI::configure('debug', false);
?>

<?php 
$mashup = new clMashup();
$mashup->add('anthony jackson', new clAPI('http://search.twitter.com/search.atom?q=anthony+jackson'))->items_at('entry')->sort_by('updated');
$mashup->add('adam nitti', new clAPI('http://search.twitter.com/search.atom?q=adam+nitti'))->items_at('entry')->sort_by('updated');
$mashup->add('john patitucci', new clAPI('http://search.twitter.com/search.atom?q=john+patitucci'))->items_at('entry')->sort_by('updated');
$mashup->add('jaco pastorious', new clAPI('http://search.twitter.com/search.atom?q=jaco+pastorious'))->items_at('entry')->sort_by('updated');
$mashup->parse('2 seconds');
$mashup->info();
$mashup->sort();
?>

<?php 
if ($mashup->count()) {
    ?>
	<ul>
		<?php 
    foreach ($mashup as $item) {
        ?>
			<li><b><?php 
        echo $item->get('updated');
        ?>
</b> <em><?php 
        echo $item->source;
Ejemplo n.º 3
0
<?php

error_reporting(E_ALL);
ini_set('display_errors', true);
require_once "../src/coreylib.php";
clAPI::configure('debug', false);
?>

<?php 
$delicious_username = '';
$delicious_password = '';
$flickr_api_key = '';
$flickr_user_id = '';
$mashup = new clMashup();
// tweets:
$twitter = $mashup->add('twitter', new clAPI("http://twitter.com/statuses/public_timeline.xml"))->items_at('status')->sort_by('created_at');
// social bookmarks:
$delicious = $mashup->add('delicious', new clAPI('https://api.del.icio.us/v1/posts/recent'))->items_at('post')->sort_by('@time')->api()->basicAuth($delicious_username, $delicious_password);
// photos:
$flicker = $mashup->add('flickr', new clAPI('http://api.flickr.com/services/rest'))->items_at('photos/photo')->sort_by('@dateupload')->api()->param('method', 'flickr.people.getPublicPhotos')->param('extras', 'date_upload')->param('api_key', $flickr_api_key)->param('user_id', $flickr_user_id)->param('page', 1)->param('per_page', 12);
// blogs:
$notreble = $mashup->add('notreble', new clAPI('http://feeds.feedburner.com/bassistscom'))->items_at('channel/item')->sort_by('pubDate');
$mashup->parse('10 minutes');
$mashup->info();
$mashup->sort();
?>

<?php 
if ($mashup->count()) {
    ?>
	<ul>