PHPackages                             carlosio/geckoboard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. carlosio/geckoboard

ActiveLibrary[API Development](/categories/api)

carlosio/geckoboard
===================

A PHP library for dealing with Geckoboard API (http://www.geckoboard.com)

1.0.11(10y ago)40172.2k↓50%34[2 issues](https://github.com/carlosbuenosvinos/php-geckoboard-api/issues)[2 PRs](https://github.com/carlosbuenosvinos/php-geckoboard-api/pulls)MITPHPPHP &gt;=5.3.3CI failing

Since May 24Pushed 8y ago8 watchersCompare

[ Source](https://github.com/carlosbuenosvinos/php-geckoboard-api)[ Packagist](https://packagist.org/packages/carlosio/geckoboard)[ RSS](/packages/carlosio-geckoboard/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (14)Used By (0)

CarlosIO\\Geckoboard
====================

[](#carlosiogeckoboard)

[![Build Status](https://camo.githubusercontent.com/60c9704ef531f4a80df392e0cc0bef805d0bd7ef54d6a1371d250b44253608ce/68747470733a2f2f7472617669732d63692e6f72672f6361726c6f736275656e6f7376696e6f732f7068702d6765636b6f626f6172642d6170692e7376673f6272616e63683d6d6173746572)](http://travis-ci.org/carlosbuenosvinos/php-geckoboard-api) [![Code Coverage](https://camo.githubusercontent.com/da466a739673903784904650ea042978ba0c90422f2804ceb9d733371c0e63cf/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6361726c6f736275656e6f7376696e6f732f7068702d6765636b6f626f6172642d6170692f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/carlosbuenosvinos/php-geckoboard-api/?branch=master) [![Latest Stable Version](https://camo.githubusercontent.com/99677a74699518fd8be8442c5ef9cbe9be18c95cf9507a784c175a3aab3ce454/68747470733a2f2f706f7365722e707567782e6f72672f6361726c6f73696f2f6765636b6f626f6172642f762f737461626c652e737667)](https://packagist.org/packages/carlosio/geckoboard) [![Total Downloads](https://camo.githubusercontent.com/43d9b079c09df380be73f6c9b302cefdcc0bd8ca0355745850e33196ef285609/68747470733a2f2f706f7365722e707567782e6f72672f6361726c6f73696f2f6765636b6f626f6172642f646f776e6c6f6164732e737667)](https://packagist.org/packages/carlosio/geckoboard) [![Latest Unstable Version](https://camo.githubusercontent.com/d9fbbab464a8ed908b908c7b6c1ee281e4248ea49b12ff2ea533e4076715d31e/68747470733a2f2f706f7365722e707567782e6f72672f6361726c6f73696f2f6765636b6f626f6172642f762f756e737461626c652e737667)](https://packagist.org/packages/carlosio/geckoboard) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/1b307fcb8199619106c83c4633dc2382978b889e29c62f14b8b188616eda467f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6361726c6f736275656e6f7376696e6f732f7068702d6765636b6f626f6172642d6170692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/carlosbuenosvinos/php-geckoboard-api/?branch=master) [![License](https://camo.githubusercontent.com/5df95efbd857013c392c9cb48195ba1c0afd73490d6b29f8aea630ce8d89a20c/68747470733a2f2f706f7365722e707567782e6f72672f6361726c6f73696f2f6765636b6f626f6172642f6c6963656e73652e737667)](https://packagist.org/packages/carlosio/geckoboard)[![SensioLabsInsight](https://camo.githubusercontent.com/8c8616ef4e9d72df561c5890f9ee06ad148b35c42cd4a466fd789572b653c680/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f63646531396537332d366434632d346530342d616333392d6537343661383333336432332f6d696e692e706e67)](https://insight.sensiolabs.com/projects/cde19e73-6d4c-4e04-ac39-e746a8333d23)

A PHP library for pushing data into Geckoboard custom widgets ()

Installation
============

[](#installation)

The best way to install the library is by using [Composer](http://getcomposer.org). Add the following to `composer.json` in the root of your project:

```
{
    "require": {
        "carlosio/geckoboard": "1.*"
    }
}
```

Then, on the command line:

```
curl -s http://getcomposer.org/installer | php
php composer.phar install
```

Use the generated `vendor/autoload.php` file to autoload the library classes.

Usage
=====

[](#usage)

```
require __DIR__ . '/vendor/autoload.php';

use CarlosIO\Geckoboard\Widgets\NumberAndSecondaryStat;
use CarlosIO\Geckoboard\Client;

$widget = new NumberAndSecondaryStat();
$widget->setId('');
$widget->setMainValue(123);
$widget->setSecondaryValue(238);
$widget->setMainPrefix('EUR');

$geckoboardClient = new Client();
$geckoboardClient->setApiKey('');
$geckoboardClient->push($widget);
```

Widget: Number and optional secondary stat
==========================================

[](#widget-number-and-optional-secondary-stat)

[![Number and optional secondary stat](https://camo.githubusercontent.com/09189f26f3a49379fa1e5b66995fc60cce1e0fc2831b68bb8f6f6b7b956b0bbb/687474703a2f2f63646e322e68756273706f742e6e65742f6875622f3332363835342f66696c652d3337363138383230302d706e672f696d616765732f4e756d626572326e64737461742d312e706e67)](http://www.geckoboard.com/developers/custom-widgets/widget-types/number-and-optional-secondary-stat/)

```
use CarlosIO\Geckoboard\Widgets\NumberAndSecondaryStat;
use CarlosIO\Geckoboard\Client;

$widget = new NumberAndSecondaryStat();
$widget->setId('');
$widget->setMainValue(123);
$widget->setSecondaryValue(238);
$widget->setMainPrefix('EUR');

$geckoboardClient = new Client();
$geckoboardClient->setApiKey('');
$geckoboardClient->push($widget);
```

Widget: RAG numbers only
========================

[](#widget-rag-numbers-only)

[![RAG numbers only](https://camo.githubusercontent.com/5bc96d44adb1c176896052b03529084194fc1a658fbcd97f01f84386ace4292d/687474703a2f2f63646e322e68756273706f742e6e65742f6875622f3332363835342f66696c652d3337363138343432302d706e672f696d616765732f5241474e756d626572732d312e706e67)](http://www.geckoboard.com/developers/custom-widgets/widget-types/rag-numbers-only/)

```
use CarlosIO\Geckoboard\Data\Entry;
use CarlosIO\Geckoboard\Widgets\RagNumbers;
use CarlosIO\Geckoboard\Client;

$widget = new RagNumbers();
$widget->setId('');

$redData = new Entry();
$redData->setValue(132)->setText('This is the red description');
$widget->setRedData($redData);

$amberData = new Entry();
$amberData->setValue(134)->setText('This is the amber description');
$widget->setAmberData($amberData);

$greenData = new Entry();
$greenData->setValue(34)->setText('This is the green description');
$widget->setGreenData($greenData);

$geckoboardClient->push($widget);
```

Widget: RAG column and numbers
==============================

[](#widget-rag-column-and-numbers)

[![RAG column and numbers](https://camo.githubusercontent.com/31b65851e86f2111b5bd021d5c0e956b08bef834c6a40ad270ed718915f3ddf3/687474703a2f2f63646e322e68756273706f742e6e65742f6875622f3332363835342f66696c652d3337373730353439392d706e672f696d616765732f524147436f6c4e756d2d312d312e706e67)](http://www.geckoboard.com/developers/custom-widgets/widget-types/rag-column-and-numbers/)

```
use CarlosIO\Geckoboard\Data\Entry;
use CarlosIO\Geckoboard\Widgets\RagColumnAndNumbers;
use CarlosIO\Geckoboard\Client;

$widget = new RagColumnAndNumbers();
$widget->setId('');

$redData = new Entry();
$redData->setValue(132)->setText('This is the red description');
$widget->setRedData($redData);

$amberData = new Entry();
$amberData->setValue(13)->setText('This is the amber description');
$widget->setAmberData($amberData);

$greenData = new Entry();
$greenData->setValue(3)->setText('This is the green description');
$widget->setGreenData($greenData);

$geckoboardClient->push($widget);
```

Widget: Text
============

[](#widget-text)

[![Text](https://camo.githubusercontent.com/e0bea978730cbcd15447552b990682d04c774bc78e455e47ee3f58d0f6a38130/687474703a2f2f63646e322e68756273706f742e6e65742f6875622f3332363835342f66696c652d3337313234313135342d706e672f696d616765732f546578742d312e706e67)](http://www.geckoboard.com/developers/custom-widgets/widget-types/text/)

```
use CarlosIO\Geckoboard\Widgets\Text;
use CarlosIO\Geckoboard\Data\Text\Item;
use CarlosIO\Geckoboard\Client;

$widget = new Text();
$widget->setId('');

$firstItem = new Item();
$secondItem = new Item();

$firstItem->setText('Test message 1');

$secondItem->setText('Test message 2');
$secondItem->setType(Item::TYPE_ALERT);

$widget->addItem($firstItem);
$widget->addItem($secondItem);

$geckoboardClient->push($widget);
```

Widget: Funnel
==============

[](#widget-funnel)

[![Funnel](https://camo.githubusercontent.com/62dd9ad1b458cd1b5be9c91d27eaff1009a0648531de1fb5e336032031d9047c/687474703a2f2f63646e322e68756273706f742e6e65742f6875622f3332363835342f66696c652d3337333938313738362d706e672f696d616765732f46756e6e656c2d312e706e67)](http://www.geckoboard.com/developers/custom-widgets/widget-types/funnel/)

```
use CarlosIO\Geckoboard\Data\Funnel\Entry;
use CarlosIO\Geckoboard\Widgets\Funnel;

$widget = new Funnel();
$widget->setId('');
$widget->setType('reversed');
$widget->setShowPercentage(false);

$error = new Entry();
$error->setLabel('Step 1')->setValue(87809);
$widget->addEntry($error);

$error = new Entry();
$error->setLabel('Step 2')->setValue(70022);
$widget->addEntry($error);

$error = new Entry();
$error->setLabel('Step 3')->setValue(63232);
$widget->addEntry($error);

$error = new Entry();
$error->setLabel('Step 4')->setValue(53232);
$widget->addEntry($error);

$error = new Entry();
$error->setLabel('Step 5')->setValue(32123);
$widget->addEntry($error);

$error = new Entry();
$error->setLabel('Step 6')->setValue(23232);
$widget->addEntry($error);

$error = new Entry();
$error->setLabel('Step 7')->setValue(12232);
$widget->addEntry($error);

$error = new Entry();
$error->setLabel('Step 8')->setValue(2323);
$widget->addEntry($error);

$geckoboardClient->push($widget);
```

Widget: PieChart
================

[](#widget-piechart)

[![PieChart](https://camo.githubusercontent.com/80b5809a3745826f672be16c000017da5cc1b2c46aa7ae77e17b34caf1771aa3/68747470733a2f2f6432733238796763326b373939382e636c6f756466726f6e742e6e65742f7769646765745f7468756d62735f6e65772f70696563686172742e706e67)](https://developer.geckoboard.com/#pie-chart)

```
use CarlosIO\Geckoboard\Data\PieChart\Entry;
use CarlosIO\Geckoboard\Widgets\PieChart;

$widget = new PieChart();
$widget->setId('');

$entry = new Entry();
$entry->setLabel('May')->setValue(100)->setColor('ffff10');
$widget->addEntry($entry);

$entry = new Entry();
$entry->setLabel('June')->setValue(160)->setColor('ffaa0a');
$widget->addEntry($entry);

$entry = new Entry();
$entry->setLabel('July')->setValue(300)->setColor('ff5505');
$widget->addEntry($entry);

$entry = new Entry();
$entry->setLabel('August')->setValue(140)->setColor('ff0000');
$widget->addEntry($entry);

$geckoboardClient->push($widget);
```

Widget: Geck-o-Meter
====================

[](#widget-geck-o-meter)

[![Geck-o-Meter](https://camo.githubusercontent.com/8566f78712d1e93dad9e3872946730717e2eedf3f9c51ed16100a52ad7dc9cc1/687474703a2f2f63646e322e68756273706f742e6e65742f6875622f3332363835342f66696c652d3337333936363335362d706e672f696d616765732f4765636b2d4f2d4d657465722d312e706e673f743d31333833393036373932303030)](http://www.geckoboard.com/developers/custom-widgets/widget-types/geck-o-meter)

```
use CarlosIO\Geckoboard\Data\Entry;
use CarlosIO\Geckoboard\Widgets\GeckoMeter;

$widget = new GeckoMeter();
$widget->setId('');

$widget->setMinData((new Entry())->setValue(0));
$widget->setMaxData((new Entry())->setValue(100));
$widget->setValue($data);

$geckoboardClient->push($widget);
```

Widget: Map
===========

[](#widget-map)

[![Map](https://camo.githubusercontent.com/4e07c9b68ac5dd67947619b7a3b9e27773c7275f0fe9ef84247d99f4fee1d774/687474703a2f2f63646e322e68756273706f742e6e65742f6875622f3332363835342f66696c652d3337313139303733392d706e672f696d616765732f4d61702d312e706e67)](http://www.geckoboard.com/developers/custom-widgets/widget-types/map)

```
use CarlosIO\Geckoboard\Data\Point;
use CarlosIO\Geckoboard\Widgets\Map;

$widget = new Map();
$widget->setId('');

$point = new Point();
$point->setSize(10)->setColor('FF0000')->setLatitude('40.416775')->setLongitude('-3.70379');
$widget->addPoint($point);

$geckoboardClient->push($widget);
```

Widget: LineChart
=================

[](#widget-linechart)

[![Line Chart](https://camo.githubusercontent.com/7fa452eec4f80592a29eced427567de423cb438b6a2b575576f9e0b2805dad23/687474703a2f2f63646e322e68756273706f742e6e65742f6875622f3332363835342f66696c652d3337333937373239362d706e672f696d616765732f4c696e652d312e706e67)](http://www.geckoboard.com/developers/custom-widgets/widget-types/line-chart)

```
use CarlosIO\Geckoboard\Widgets\LineChart;

$widget = new LineChart();
$widget->setId('');
$widget->setItems(array(1, 1.23));
$widget->setColour("ff0000");
$widget->setAxis(LineChart::DIMENSION_X, array("min", "max"));
$widget->setAxis(LineChart::DIMENSION_Y, array("bottom", "top"));

$geckoboardClient->push($widget);
```

Widget: List
============

[](#widget-list)

[![List](https://camo.githubusercontent.com/7a35295229b5000378f77e1038a97471f61c97e5ed69f775102459c7cc9063f6/687474703a2f2f63646e322e68756273706f742e6e65742f6875622f3332363835342f66696c652d3337343634383238322d706e672f696d616765732f6c6973745f3278322e706e673f743d31333833393037363130303030)](http://www.geckoboard.com/developers/custom-widgets/widget-types/list)

```
use CarlosIO\Geckoboard\Data\ItemList\Label;
use CarlosIO\Geckoboard\Data\ItemList\Title;
use CarlosIO\Geckoboard\Widgets\ItemList;

$widget = new ItemList();
$widget->setId('');

$title = new Title();
$title->setText("Title text");
$title->setHighlight(true);

$title2 = new Title();
$title2->setText("Title2 text");
$title2->setHighlight(false);

$label = new Label();
$label->setName("Label name");
$label->setColor("red");

$label2 = new Label();
$label2->setName("Label2 name");
$label2->setColor("blue");

$widget->addItem($title, $label, 'description1');
$widget->addItem($title2, $label2, 'description2');

$geckoboardClient->push($widget);
```

Widget: Monitoring
==================

[](#widget-monitoring)

[![Monitoring](https://camo.githubusercontent.com/e1b532e9fdbc57a56caa67115c1a78b12809d30521d7d75ab4244176771bc486/68747470733a2f2f646576656c6f7065722e6765636b6f626f6172642e636f6d2f696d616765732f6d6f6e69746f72696e672d35363431643665642e706e67)](https://camo.githubusercontent.com/e1b532e9fdbc57a56caa67115c1a78b12809d30521d7d75ab4244176771bc486/68747470733a2f2f646576656c6f7065722e6765636b6f626f6172642e636f6d2f696d616765732f6d6f6e69746f72696e672d35363431643665642e706e67)

```
$widget = (new Monitoring())
    ->setId('')
    ->setStatus('Up')
    ->setDownTime('3 days ago')
    ->setResponseTime('100 ms');

$geckoboardClient()->push($widget);
```

Widget: LeaderBoard
===================

[](#widget-leaderboard)

[![Monitoring](https://camo.githubusercontent.com/34100a6ed8b53990c595c6b931332a594cbd2375a8dfc4804e6dc8960f4113fb/68747470733a2f2f646576656c6f7065722e6765636b6f626f6172642e636f6d2f696d616765732f6c6561646572626f6172642d38333464396530342e706e67)](https://camo.githubusercontent.com/34100a6ed8b53990c595c6b931332a594cbd2375a8dfc4804e6dc8960f4113fb/68747470733a2f2f646576656c6f7065722e6765636b6f626f6172642e636f6d2f696d616765732f6c6561646572626f6172642d38333464396530342e706e67)

```
$widget = new LeaderBoard();
$widget->setId('')

$item = new Item();
$item->setLabel("Title text")
    ->setValue(10)
    ->setPreviousRank(2);
$widget->addItem($item);

$item = new Item();
$item->setLabel("Title text 2")
    ->setValue(7)
    ->setPreviousRank(1);
$widget->addItem($item);

$geckoboardClient()->push($widget);
```

Push more than one widget at the same time
==========================================

[](#push-more-than-one-widget-at-the-same-time)

```
$widgets = array();
$widget = new LineChart();
// Fill your line chart...
$widgets[] = $widget;

$widget = new Map();
// Fill your map...
$widgets[] = $widget;

$geckoboardClient->push($widgets);
```

Set timeout for pushing widgets
===============================

[](#set-timeout-for-pushing-widgets)

Use `setGuzzleConfig()` to pass config options directly to Guzzle.

```
$geckoboardClient = new Client();
$geckoboardClient->setApiKey('');
$geckoboardClient->setGuzzleConfig(array('timeout' => 30, 'connect_timeout' => 3));
$geckoboardClient->push($widget);
```

Testing
=======

[](#testing)

In order to run the test, install all dependencies: `php composer.phar install`

```
$ bin/phpunit --coverage-text

```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 59.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~38 days

Total

12

Last Release

3954d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/351553?v=4)[Carlos Buenosvinos](/maintainers/carlosbuenosvinos)[@carlosbuenosvinos](https://github.com/carlosbuenosvinos)

![](https://www.gravatar.com/avatar/6d170a185367199b3ae6f55066a3a58f53ffb667e6e64e047f519d72fe1110a4?d=identicon)[arsakiyo](/maintainers/arsakiyo)

---

Top Contributors

[![carlosbuenosvinos](https://avatars.githubusercontent.com/u/351553?v=4)](https://github.com/carlosbuenosvinos "carlosbuenosvinos (37 commits)")[![oriolgm](https://avatars.githubusercontent.com/u/919328?v=4)](https://github.com/oriolgm "oriolgm (5 commits)")[![sneat](https://avatars.githubusercontent.com/u/293277?v=4)](https://github.com/sneat "sneat (4 commits)")[![vistik](https://avatars.githubusercontent.com/u/354169?v=4)](https://github.com/vistik "vistik (3 commits)")[![raulfp](https://avatars.githubusercontent.com/u/1038187?v=4)](https://github.com/raulfp "raulfp (3 commits)")[![patxi1980](https://avatars.githubusercontent.com/u/1370286?v=4)](https://github.com/patxi1980 "patxi1980 (2 commits)")[![ischmittis](https://avatars.githubusercontent.com/u/904789?v=4)](https://github.com/ischmittis "ischmittis (2 commits)")[![Osukaru](https://avatars.githubusercontent.com/u/249598?v=4)](https://github.com/Osukaru "Osukaru (1 commits)")[![odino](https://avatars.githubusercontent.com/u/328420?v=4)](https://github.com/odino "odino (1 commits)")[![darinyo](https://avatars.githubusercontent.com/u/580329?v=4)](https://github.com/darinyo "darinyo (1 commits)")[![vguardiola](https://avatars.githubusercontent.com/u/572270?v=4)](https://github.com/vguardiola "vguardiola (1 commits)")[![arcturial](https://avatars.githubusercontent.com/u/1466729?v=4)](https://github.com/arcturial "arcturial (1 commits)")[![humandb](https://avatars.githubusercontent.com/u/7542104?v=4)](https://github.com/humandb "humandb (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/carlosio-geckoboard/health.svg)

```
[![Health](https://phpackages.com/badges/carlosio-geckoboard/health.svg)](https://phpackages.com/packages/carlosio-geckoboard)
```

###  Alternatives

[rackspace/php-opencloud

PHP SDK for Rackspace/OpenStack APIs

4495.9M38](/packages/rackspace-php-opencloud)[cdaguerre/php-trello-api

Trello API v2 client

255666.7k3](/packages/cdaguerre-php-trello-api)[dchesterton/marketo-rest-api

A PHP client for the Marketo.com REST API

41844.1k1](/packages/dchesterton-marketo-rest-api)[teepluss/api

Laravel 4 Internal Request (HMVC)

7034.0k](/packages/teepluss-api)[jlinn/mandrill-api-php

A PHP client library for Mandrill's REST API

24117.4k](/packages/jlinn-mandrill-api-php)[codemix/yiielasticsearch

Elastic Search client for Yii

3342.7k](/packages/codemix-yiielasticsearch)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
