Skip to content

Commit

Permalink
Fix build badge
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Anderson committed Oct 15, 2013
1 parent c99dea2 commit da039c8
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Keen IO PHP Library
===================
The Keen IO API lets developers build analytics features directly into their apps.

[![Build Status](https://travis-ci.org/kmfk/KeenClient-PHP.png)](https://travis-ci.org/kmfk/KeenClient-PHP.png)
[![Build Status](https://travis-ci.org/keenlabs/KeenClient-PHP.png?branch=master)](https://travis-ci.org/keenlabs/KeenClient-PHP)

Installation with Composer
------------
Expand Down Expand Up @@ -57,9 +57,9 @@ Currently the Keen IO Webservice Client only supports - and automatically defaul
use KeenIO\Client\KeenIOClient;

$client = KeenIOClient::factory([
'projectId' => $projectId,
'writeKey' => $writeKey,
'readKey' => $readKey
'projectId' => $projectId,
'writeKey' => $writeKey,
'readKey' => $readKey
]);
```

Expand Down Expand Up @@ -105,11 +105,11 @@ where those events should be stored.
######Example
```php
$purchases = [
[ 'purchase' => [ 'item' => 'Golden Elephant' ] ],
[ 'purchase' => [ 'item' => 'Magenta Elephant' ] ]
[ 'purchase' => [ 'item' => 'Golden Elephant' ] ],
[ 'purchase' => [ 'item' => 'Magenta Elephant' ] ]
];
$signUps = [
[ 'name' => 'foo', 'email' => '[email protected]' ]
[ 'name' => 'foo', 'email' => '[email protected]' ]
];

$client->addEvents([ 'data' => [ 'purchases' => $purchases, 'sign_ups' => $signUps ] ]);
Expand All @@ -131,21 +131,21 @@ $eventChunks = array_chunk( $events, 500 );
$commands = [];
foreach( $eventChunks as $eventChunk )
{
// Using getCommand will create the command with out immediately executing it
// versus using the magic methods
$commands[] = $this->getCommand( "sendEvents", [ 'data' => [ 'purchases' => $eventChunk ] ] );
// Using getCommand will create the command with out immediately executing it
// versus using the magic methods
$commands[] = $this->getCommand( "sendEvents", [ 'data' => [ 'purchases' => $eventChunk ] ] );
}

try
{
// The commands can then be passed to the client's execute method to be run
// in parallel
$result = $this->execute( $commands );
// The commands can then be passed to the client's execute method to be run
// in parallel
$result = $this->execute( $commands );
}
catch( \KeenIO\Exception\CommandTransferException $e )
{
// Handle any errored commands...
$failedCommands = $e->getFailedCommands();
// Handle any errored commands...
$failedCommands = $e->getFailedCommands();
}
```

Expand All @@ -169,8 +169,8 @@ $items = $client->selectUnique( 'purchases', [ 'target_property' => 'purchase.it

//Multi Analysis
$analyses = [
'clicks' => [ "analysis_type" => "count" ],
'average price' => [ "analysis_type" => "average", "target_property" => "purchase.price" ]
'clicks' => [ "analysis_type" => "count" ],
'average price' => [ "analysis_type" => "average", "target_property" => "purchase.price" ]
];
$stats = $client->multiAnalysis( 'purchases', [ 'analyses' => $analyses ]);
```
Expand All @@ -184,9 +184,9 @@ for more details.
######Example
```php
$filter = [
'property_name' => 'user_id',
'operator' => 'eq',
'property_value' => '123'
'property_name' => 'user_id',
'operator' => 'eq',
'property_value' => '123'
];

$filters = [ $filter ];
Expand Down

0 comments on commit da039c8

Please sign in to comment.