PHPackages                             smartapps/php-api - 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. smartapps/php-api

ActiveLibrary[API Development](/categories/api)

smartapps/php-api
=================

A library to connect on S.M.A.R.T platform that can integrate webpages with smart data

05PHP

Since Oct 29Pushed 11y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

SMARTAPPS API Client PHP
========================

[](#smartapps-api-client-php)

This library can help developers create webpages integrated with S.M.A.R.T platform ([www.smartapps.com.br](http://www.smartapps.com.br))

Requirements
------------

[](#requirements)

```
- Composer
- cUrl Library
- PHP >= 5.3

```

Source
------

[](#source)

You can found the source of library in the **src** folder.

Install examples with composer
------------------------------

[](#install-examples-with-composer)

\####1. First step, Install composer :) To do it, you need run **composer install** or **php compose.phar install**.

\####2. Install library 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"**.

\####3. Run example :D 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**

Examples
--------

[](#examples)

#### Basic data (basic\_data.php)

[](#basic-data-basic_dataphp)

This example show how to get data from a application

#### Exec method (exec\_method.php)

[](#exec-method-exec_methodphp)

This example show how to execute a method on a application

#### Post simple (exec\_method\_post\_simple.php)

[](#post-simple-exec_method_post_simplephp)

This example show to send a simple block of data.

#### Post massive data (exec\_method\_post\_massive.php)

[](#post-massive-data-exec_method_post_massivephp)

This example show how to send a array of data to any method on a application

#### View forms

[](#view-forms)

This example show how you can see forms avaiables on a application.

#### View schemas

[](#view-schemas)

This example show how you can see data schemas to a application.

**Note**: if you liked the examples and you want more, feel free and help us. let's go change the world using the web.

Library methods
---------------

[](#library-methods)

Below you can see methods avaiable for this library.

##### connect($app, $api\_user=false, $api\_key=false)

[](#connectapp-api_userfalse-api_keyfalse)

You need use this method to connect on S.M.A.R.T

\######Params $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.

##### connectionClose()

[](#connectionclose)

You need use this method to disconnect of S.M.A.R.T

##### method($conn, $schema, $method, $args=false, $return="json", $app=false)

[](#methodconn-schema-method-argsfalse-returnjson-appfalse)

You can use this method to do a GET request directly using a method as reference.

\######Params $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.

##### methodPost($conn, $schema, $method, $postVars, $args=false, $return="json", $app=false)

[](#methodpostconn-schema-method-postvars-argsfalse-returnjson-appfalse)

You can use this method to do a POST request directly using a method as reference.

\######Params $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.

##### getSchemas($conn)

[](#getschemasconn)

You can use this method to see which schemas avaiable on a app.

\######Params $conn : Connection object reference, found it on return of method connect.

##### getForms($conn, $schema)

[](#getformsconn-schema)

You can use this method to see forms.

\######Params $conn : Connection object reference, found it on return of method connect. $schema : Schema of data.

##### getData($conn, $schema, $form)

[](#getdataconn-schema-form)

You can use this method to get data.

\######Params $conn : Connection object reference, found it on return of method connect. $schema : Schema of data. $form : Form name.

##### getFile($conn, $file, $mime, $date)

[](#getfileconn-file-mime-date)

You can use this method to get a filepath.

\######Params $conn : Connection object reference, found it on return of method connect. $file : File name. $mime : Mimetype of the file. $date : Date file registry.

##### sendExec($conn, $app, $schema, $form, $postVars, $return="json")

[](#sendexecconn-app-schema-form-postvars-returnjson)

You can use this method to send data to a form.

\######Params $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.

##### sendTo($conn, $schema, $form, $postVars=false, $app=false)

[](#sendtoconn-schema-form-postvarsfalse-appfalse)

You can use this method to send data to a form directly.

\######Params $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](http://www.smartapps.com.br)).

@author José Wilker

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6e690f38b7b3cb8897195d93318d4445431b051f609d0010ff1d5e7814d720e?d=identicon)[josewilker](/maintainers/josewilker)

---

Top Contributors

[![smartappsbrasil](https://avatars.githubusercontent.com/u/9602124?v=4)](https://github.com/smartappsbrasil "smartappsbrasil (18 commits)")

### Embed Badge

![Health badge](/badges/smartapps-php-api/health.svg)

```
[![Health](https://phpackages.com/badges/smartapps-php-api/health.svg)](https://phpackages.com/packages/smartapps-php-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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