My favorites | Sign in
Project Home Downloads Wiki Source
Project Information
Members
Featured
Downloads
Links

Introduction

This is a PHP 5 class for accessing the MyBlogLog API. It implements all of the V1 API calls (currently in private beta) to date. It uses Curl for making the requests and implements a caching layer to improve performance.

The class currently does not distinguish between API errors and simply returns false for all errors. Further development is in the works, but this class has allowed us to quickly build applications using the MyBlogLog API.

Documentation

Requirements

  • PHP 5
  • Curl

Quick Start

Hopefully, this class should be pretty self explanatory when you look through the code. The documentation you'll need is the MyBlogLog API documentation. All API methods have been created as member functions.

For example, community.readers.list is called by the member function $mblobject->communityReadersList()

Usage

include("class.mybloglog.php");
$mbl = new MyBlogLog(MY_API_KEY);

Optionally, you can pass in a community ID if most of your calls will be centered around one community. Any API call requiring a community ID will then default to this ID if you skip the parameter (or pass in NULL):

$mbl = new MyBlogLog(MY_API_KEY,MY_COMMUNITY_ID);
$users = $mbl->communityMembersList();

Examples

List community members:

$mbl = new MyBlogLog(MY_API_KEY,MY_COMMUNITY_ID);
$users = $mbl->communityMembersList();
echo "<ul>";
foreach ($users as $user) {
	echo "<li>$user[nickname]</li>";
}
echo "</ul>";

More documentation

Powered by Google Project Hosting