Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Various API wrappers for PHP
PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
GoodGuide
Klout
Opendover
Quova
Transport
GoodGuide.php
Klout.php
License.txt
Opendover.php
Quova.php
readme.markdown

readme.markdown

API Wrapper

Requirements

Installation:

Place the CalEvans directory in a directory in your include_path.

Klout Usage:

$o = new CalEvans_Klout($key,'CalEvans');
foreach ($o->topics() as $topic) {
    echo $topic . "\n";
}

OpenDover Usage:

$o = new CalEvans_Opendover($key,new CalEvans_Transport_Curl());
$twitterStream = file_get_contents('http://search.twitter.com/search.json?q=politics');
$twitterStream=json_decode($twitterStream);
foreach($twitterStream->results as $tweet) {
    $y=$o->searchSentiments($tweet->text);
    echo $tweet->text."\n";
    print_r($y);
    sleep(1);
}

Quova Usage:

$o = new CalEvans_Quova($key,$secret,new CalEvans_Transport_Curl());
$returnValue = $o->ipinfo($ipAddress);
echo $returnValue->Location->CityData->city;

GoodGuide Usage:

$o = new CalEvans_GoodGuide($key,new CalEvans_Transport_File());

try {
  $o->id=345779;
  $o->api_format='badge';
  $results = $o->call();
  print_r($results);

} catch (Exception $e) {
    echo "<pre>\n";
    print_r($e->getMessage());
}

Release Notes:

1.0 - Initial public release

1.1 - Pulled curl code out of _execute and created a Transport.

2.0 Added Opendover API wrapper Added header tracking to Transport Transport_Exception now have the headers as part of the message.

3.0 Added Quova API wrapper

4.0 Added GoodGuide wrapper

5.0 Converted to PHP 5.3+. Added Namespaces Added File transport.

Something went wrong with that request. Please try again.