Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
gets me a list of all bookmarks tagged 'weekly' for the last week via the pinboard API. uses
include 'pinboard-api.php'; //
$pinboard = new PinboardAPI('USERNAME','PASSWORD');
$date = date_create('now');
$lastweek = date_sub($date, date_interval_create_from_date_string('7 days'));
$lastweek = date_format($date, 'Y-m-d');
$weekly = $pinboard->get_all(null,null,'weekly', $lastweek,null);
echo '<ul>';
foreach ($weekly as $bookmark) {
echo '<li><a href="' . $bookmark->url . '">' . $bookmark->title . '</a><br>' ;
echo '<blockquote>' . $bookmark->description . '</blockquote></li>';
// echo implode(' ',$bookmark->tags) . " => " . "</li>";
sleep(3); // honor API rate limit
echo '</ul>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.