dev-master
9999999-dev https://github.com/thingdomio/thingdom-phpThe official PHP library for the Thingdom.io API
MIT
The Requires
- php >=5.3.3
- ext-curl *
by Andrew Frenz
api curl thingdom
The official PHP library for the Thingdom.io API
PHP library for v1.1 of the Thingdom.io API., (*1)
Thingdom allows you to mobile-enable your product in four lines of code with no need to develop the iOS and Android apps or create scalable cloud infrastructure. Get Started Now!, (*2)
, (*3)
You must have cURL for PHP installed in order to use this library., (*4)
CentOS:, (*5)
sudo yum install php5-curl
Ubuntu:, (*6)
sudo apt-get install php5-curl
First things first, Get your free API access. Next, if your not using composer, download this library and then try the following code., (*7)
<?php require_once('Thingdom.php'); // instantiate Thingdom object and authenticate $thingdom = new Thingdom('YOUR_API_SECRET'); // look-up Thing and get back object $thing = $thingdom->getThing('YOUR_THING_NAME'); // send a feed message $thing->feed('FEED_CATEGORY', 'MESSAGE'); // send a status update $thing->status('KEY', 'VALUE');
If you would like to use composer instead then follow these directions., (*8)
Create a new composer.json file with thingdomio/thingdom-php as a dependency (or add to your project's existing composer.json file), (*9)
{ "require": { "thingdomio/thingdom-php": "dev-master" } }
Use composer to install the dependencies, (*10)
Go ahead and try out the following code., (*11)
<?php require_once __DIR__ . '/vendor/autoload.php'; // Autoload files using Composer autoload // instantiate Thingdom object and authenticate $thingdom = new Thingdom('YOUR_API_SECRET'); // look-up Thing and get back object $thing = $thingdom->getThing('YOUR_THING_NAME'); // send a feed message $thing->feed('FEED_CATEGORY', 'MESSAGE'); // send a status update $thing->status('KEY', 'VALUE');
The official PHP library for the Thingdom.io API
MIT
api curl thingdom