PHPackages                             robmachado/apigranatum - 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. robmachado/apigranatum

ActiveLibrary[API Development](/categories/api)

robmachado/apigranatum
======================

Classes auxiliares para uso da API do GRANATUM Financeiro

v1.0.1(8y ago)086MITPHPPHP &gt;=7.0

Since Apr 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/robmachado/apigranatum)[ Packagist](https://packagist.org/packages/robmachado/apigranatum)[ RSS](/packages/robmachado-apigranatum/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

ApiGranatum
===========

[](#apigranatum)

Biblioteca PHP com classes auxiliares para integração com Granatum Financeiro

> ## [Granatum](http://www.granatum.com.br) é um aplicativo WEB para gestão financeira de excelente qualidade
>
> [](#granatum-é-um-aplicativo-web-para-gestão-financeira-de-excelente-qualidade)
>
> Sua API (Restful) fornece várias funcionalidades que são acessadas por estas classes.

- Bancos *(Listagem)*
- Categorias *(Listagem, Inclusão, Alteração, Deleção)*
- Centros Custo Lucro *(Listagem, Inclusão, Alteração, Deleção)*
- Cidades *(Listagem)*
- Clientes *(Listagem, Inclusão, Alteração, Deleção)*
- Cobranças *(Listagem, Inclusão, Alteração, Deleção)*
- Contas *(Listagem, Inclusão, Alteração, Deleção)*
- Estados *(Listagem)*
- Formas de Pagamentos *(Listagem, Inclusão, Alteração, Deleção)*
- Fornecedores *(Listagem, Inclusão, Alteração, Deleção)*
- Lançamentos *(Listagem, Inclusão, Alteração, Deleção)*

Créditos
--------

[](#créditos)

Estas classes foram desenvolvidas com base no repositório das classes criadas por Lucas Nunes Pinto Pinheiro.

[lucasnpinheiro/granatum](https://github.com/lucasnpinheiro/granatum) Ao qual agradeço muito a disponibilização livre de suas classes de integração.

Instalação
----------

[](#instalação)

```
composer require robmachado/apigranatum

```

Dependências
------------

[](#dependências)

- "php" : "&gt;=7.0",
- "ext-curl": "\*",
- "ext-json": "\*",
- "curl/curl": "^1.8"

Formas de uso
-------------

[](#formas-de-uso)

- Instanciar Connector::class (faz a comunicação usando Curl\\Curl)
- Carregar a classe desejada usando Granatum::class
- Estabelecer o método desejado all(), get(), edit(), add(), ou delete()
- Passar os parâmetros estabelecidos pela API (e pela operação)
- O retorno sempre será uma string (json) ou um booleano
- Em caso de erros será retornado uma \\Exception

### Exemplo de uso

[](#exemplo-de-uso)

```
use ApiGranatum\Granatum;
use ApiGranatum\Connector;

$token = 'lkjd786487648746jhjhe989389syhhhwuh9837398739hdskh';
$version = 'v1';
$uri = 'https://api.granatum.com.br';

try {
    $conn = new Connector($token, $version, $uri);
    $b = Granatum::bancos($conn);
    $resp = $b->all();
    if ($resp === 'false') {
        echo "Falhou ...";
    } elseif ($resp === 'true') {
        echo "Operação realizada com Sucesso!!";
    } else {
        echo "";
        print_r($resp);
        echo "";
    }
} catch (\Exception $e) {
    echo $e->getMessage();
}
```

**MIT License**

Copyright (c) 2018 Roberto Leite Machado

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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.

###  Release Activity

Cadence

Every ~12 days

Total

2

Last Release

2922d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/83b3feccdc04943c30ac9b785307cb73385c30d5b3ad8a7c700f7704416dc280?d=identicon)[robmachado](/maintainers/robmachado)

---

Top Contributors

[![robmachado](https://avatars.githubusercontent.com/u/1437008?v=4)](https://github.com/robmachado "robmachado (13 commits)")

---

Tags

apigranatum

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/robmachado-apigranatum/health.svg)

```
[![Health](https://phpackages.com/badges/robmachado-apigranatum/health.svg)](https://phpackages.com/packages/robmachado-apigranatum)
```

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.0k](/packages/m165437-laravel-blueprint-docs)

PHPackages © 2026

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