A library to connect on S.M.A.R.T platform that can integrate webpages with smart data
This library can help developers create webpages integrated with S.M.A.R.T platform (www.smartapps.com.br), (*1)
- Composer - cUrl Library - PHP >= 5.3
You can found the source of library in the src folder., (*2)
To do it, you need run composer install or php compose.phar install., (*3)
You need install this library using Composer. So, add package name smartapps/php-api on the dev-master version in your composer.json. If you want do it using CLI, run the command: composer require "smartapps/php-api:dev-master"., (*4)
On the main folder, you can run the file opening into your browser or you can run the example with CLI: php examples/basic_data.php, (*5)
This example show how to get data from a application, (*6)
This example show how to execute a method on a application, (*7)
This example show to send a simple block of data., (*8)
This example show how to send a array of data to any method on a application, (*9)
This example show how you can see forms avaiables on a application., (*10)
This example show how you can see data schemas to a application., (*11)
Note: if you liked the examples and you want more, feel free and help us. let's go change the world using the web., (*12)
Below you can see methods avaiable for this library., (*13)
You need use this method to connect on S.M.A.R.T, (*14)
$app : Application that you want connect. $api_user : API USER :P, You can found yours, on 'API Tool' in the option 'registered keys' on your enviroment. $api_key : API KEY :P, You can found it on 'API Tool' in your environment.
You need use this method to disconnect of S.M.A.R.T, (*15)
You can use this method to do a GET request directly using a method as reference., (*16)
$conn : Connection object reference, found it on return of method connect $schema : Schema of data $method : Method name $args : Array of arguments that method need. $return : Type of request return $app : Subscribe application when execute this method.
You can use this method to do a POST request directly using a method as reference., (*17)
$conn : Connection object reference, found it on return of method connect $schema : Schema of data $method : Method name $args : Array of arguments that method need. $return : Type of request return $app : A way to subscribe application after connected.
You can use this method to see which schemas avaiable on a app., (*18)
$conn : Connection object reference, found it on return of method connect.
You can use this method to see forms., (*19)
$conn : Connection object reference, found it on return of method connect. $schema : Schema of data.
You can use this method to get data., (*20)
$conn : Connection object reference, found it on return of method connect. $schema : Schema of data. $form : Form name.
You can use this method to get a filepath., (*21)
$conn : Connection object reference, found it on return of method connect. $file : File name. $mime : Mimetype of the file. $date : Date file registry.
You can use this method to send data to a form., (*22)
$conn : Connection object reference, found it on return of method connect. $app : Application. $schema : Schema of data. $form : Form name. $postVars : Array data for send. $return : Return of request.
You can use this method to send data to a form directly., (*23)
$conn : Connection object reference, found it on return of method connect. $app : Application. $schema : Schema of data. $form : Form name. $postVars : Array data for send. $app : A way to subscribe application after connected.
If you want more details about API Tool of S.M.A.R.T Platform, see API Docs on Smartapps web site (www.smartapps.com.br)., (*24)
@author José Wilker jose.wilker@smartapps.com.br, (*25)