Telemetry-PHP is a library used to interact with the Telemetry App (https://www.telemetryapp.com/) Dashboard Suite. As of 5/5/13, this library supports all Data Flows.
The library is pretty self-explanatory. For more details on using the Telemetry API go to their Documentation (https://www.telemetryapp.com/documentation/intro-to-telemetry/)
```php $tel = new Telemetry(YOUR_TELEMETRY_TOKEN); ``` ```php $barchart = new Telemetry\DataFlows\BarChart(); $bar = new Telemetry\DataFlows\Bar(); $bar->value = 10000; $bar->label = "Max"; $bar->color = "#FF0000"; $barchart->addBar($bar);$bar2 = new Telemetry\DataFlows\Bar();
$bar2->value = 800;
$bar2->label = "B";
$bar2->color = "#00FF00";
$barchart->addBar($bar2);
$tel->addDataFlow("test_bar_chart",$barchart);
<h2>Countdown</h2>
```php
$countdown = new Telemetry\DataFlows\Countdown();
$countdown->time = strtotime("tomorrow");
$countdown->message = "Until tomorrow";
$tel->addDataFlow("test_countdown",$countdown);
$tel->addDataFlow("test_gauge",$gauge);
<h2>Graph</h2>
```php
$graph = new Telemetry\DataFlows\Graph();
$s = new Telemetry\DataFlows\Series();
$s->values = array(1,2,3,4,5,6,7);
$graph->addSeries($s);
$tel->addDataFlow("test_graph",$graph);
$tel->addDataFlow("test_icon",$icons);
<h2>iFrame</h2>
```php
$iframe = new Telemetry\DataFlows\Iframe();
$iframe->url = "http://m.wikipedia.com/";
$tel->addDataFlow("test_iframe",$iframe);
$tel->addDataFlow("test_log",$log);
<h2>Multi-Gauge</h2>
```php
$gauge = new Telemetry\DataFlows\Gauge();
$gauge->value = 78;
$gauge->label = "Awesome";
$multigauge = new Telemetry\DataFlows\MultiGauge();
$multigauge->addGauge($gauge);
$tel->addDataFlow("test_multiguage",$multigauge);
$servers->addServer($server);
$tel->addDataFlow("test_servers",$servers);
<h2>Table</h2>
```php
$table = new Telemetry\DataFlows\Table();
$table->colors = array("#FF0000","#00FF00");
$table->header = array("Name","Value");
$table->addRow(array("Test","Test"));
$table->addRow(array("Test","Test"));
$table->addRow(array("Test","Test"));
$table->addRow(array("Test","Test"));
$tel->addDataFlow("test_table",$table);
$tel->addDataFlow("test_text",$text);
<h2>Ticker-Tape</h2>
```php
$tt = new Telemetry\DataFlows\TickerTape();
$tt->addMessage("Add Message 1");
$tt->addMessage("Add Message 2");
$tel->addDataFlow("test_tickertape",$tt);
$tel->addDataFlow("test_timeline",$timeline);
<h2>Timeseries</h2>
```php
$ts = new Telemetry\DataFlows\TimeSeries();
$ts->value = rand(0,100);
$ts->type = "hour";
$ts->label = "Bars";
$tel->addDataFlow("test_timeseries",$ts);
$tel->addDataFlow("test_up",$up);
<h2>Value</h2>
```php
$value = new Telemetry\DataFlows\Value();
$value->value = 19.99;
$value->color = "#CCCCCC";
$value->delta = 1.2;
$value->value_type = "dollar";
$value->delta_type = "absolute";
$tel->addDataFlow("test_value",$value);