powerforms/apiclient

API client for powerforms

Installs: 12

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:extension

1.0.1 2018-02-05 07:29 UTC

This package is not auto-updated.

Last update: 2024-09-20 19:45:25 UTC


README

Basic usage

// create client with configuration above
$client = new \powerforms\apiclient\Client($baseApiUrl, $apiKey, $apiSecret);

// get all available Forms
$forms = $client->getForms();

// get all data states
$states = $client->getDataStates();

// get data from 1.1.2016 for form #1
$data = $client->getData(1, '2016-01-01'); 

// get count and data from 1.1.2016 to 10.3.2016 for form #1 and #2 where state is OK 
$countData = $client->getDataCount([1,2], '2016-01-01', '2016-03-10',['OK']);
$data = $client->getData([1,2], '2016-01-01', '2016-03-10',['OK']);

Installing via Composer

# Install Composer
curl -sS https://getcomposer.org/installer | php

Next:

composer.phar require powerforms/apiclient

And add include to your script:

require 'vendor/autoload.php';