{"id":23774510,"url":"https://github.com/iaematt/cafeapi","last_synced_at":"2026-04-04T06:30:19.032Z","repository":{"id":56987979,"uuid":"408256997","full_name":"iaematt/cafeapi","owner":"iaematt","description":"CaféApi Library é um pequeno conjunto de classes desenvolvidas na formação Full Stack PHP Developer da UpInside para integração ao webservice de uma plataforma SaaS desenvolvida no curso.","archived":false,"fork":false,"pushed_at":"2021-09-20T00:20:42.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T06:15:31.706Z","etag":null,"topics":["api","fsphp","php","webservice"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iaematt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-19T23:08:58.000Z","updated_at":"2021-09-20T00:09:53.000Z","dependencies_parsed_at":"2022-08-21T09:40:28.316Z","dependency_job_id":null,"html_url":"https://github.com/iaematt/cafeapi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaematt%2Fcafeapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaematt%2Fcafeapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaematt%2Fcafeapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iaematt%2Fcafeapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iaematt","download_url":"https://codeload.github.com/iaematt/cafeapi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239964512,"owners_count":19725952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","fsphp","php","webservice"],"created_at":"2025-01-01T06:15:33.710Z","updated_at":"2026-04-04T06:30:18.970Z","avatar_url":"https://github.com/iaematt.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CafeApi Teste\n\n[![Maintainer](http://img.shields.io/badge/maintainer-@iaematt-blue.svg?style=flat-square)](https://instagram.com/iaematt_)\n[![Source Code](http://img.shields.io/badge/source-iaematt/cafeapi-blue.svg?style=flat-square)](https://github.com/iaematt/cafeapi)\n[![PHP from Packagist](https://img.shields.io/packagist/php-v/iaematt/cafeapi.svg?style=flat-square)](https://packagist.org/packages/iaematt/cafeapi)\n[![Latest Version](https://img.shields.io/github/release/iaematt/cafeapi.svg?style=flat-square)](https://github.com/iaematt/cafeapi/releases)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)\n[![Build](https://img.shields.io/scrutinizer/build/g/iaematt/cafeapi.svg?style=flat-square)](https://scrutinizer-ci.com/g/iaematt/cafeapi)\n[![Quality Score](https://img.shields.io/scrutinizer/g/iaematt/cafeapi.svg?style=flat-square)](https://scrutinizer-ci.com/g/iaematt/cafeapi)\n[![Total Downloads](https://img.shields.io/packagist/dt/iaematt/cafeapi.svg?style=flat-square)](https://packagist.org/packages/iaematt/cafeapi)\n\nCaféApi Library é um pequeno conjunto de classes desenvolvidas na formação Full Stack PHP Developer da UpInside para integração ao web service de uma plataforma SaaS desenvolvida no curso.\n\n###### CaféApi Library is a small set of classes developed in UpInside's Full Stack PHP Developer training for integration into the web service of a SaaS platform developed in the course..\n\n### Highlights\n\n-   Instalação simples\n-   Abstração de todos os métodos da API\n-   EFácil autenticação com e-mail e senha\n-   Pronto para o composer e compatível com PSR-2\n\n## Instalação\n\nInstalação possivel via composer:\n\n```bash\n\"iaematt/cafeapi\": \"^1.0\"\n```\n\nou rode\n\n```bash\ncomposer require iaematt/cafeapi\n```\n\n## Documentação\n\nPara mais detalhes sobre como usar, veja uma pasta de exemplo no diretório do componente. Nela terá um exemplo de uso para cada classe. Ele funciona assim:\n\n###### For details on how to use, see a sample folder in the component directory. In it you will have an example of use for each class. It works like this:\n\n#### User endpoint\n\n```php\n\u003c?php\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\nuse iaematt\\CafeApi\\Me;\n\n$me = new Me('api.site.com', 'nome@servidor.com.br', '123@mudar');\n\n/** Me */\n$user = $me-\u003eme();\n\n/** Update */\n$user-\u003eupdate([\n    'first_name' =\u003e 'Robson',\n    'last_name' =\u003e 'Leite',\n    'genre' =\u003e 'male',\n    'date_birth' =\u003e '1980-01-02',\n    'document' =\u003e '888888888',\n]);\n\n/** Photo */\n$user-\u003ephoto($_FILES['photo']);\n\n/** Test and result */\nif ($user-\u003eerror()) {\n    $user-\u003eerror(); /** Object */\n} else {\n    $user-\u003eresponse(); /** Object */\n}\n```\n\n#### Invoices endpoint:\n\n```php\n\u003c?php\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\nuse RobsonVLeite\\CafeApi\\Invoices;\n\n$invoices = new Invoices('api.site.com', 'nome@servidor.com.br', '123@mudar');\n\n/** Index */\n$index = $invoices-\u003eindex(null);\n\n/** Index filter */\n$index = $invoices-\u003eindex([\n    'wallet_id' =\u003e 23,\n    'type' =\u003e 'fixed_income',\n    'status' =\u003e 'paid',\n    'page' =\u003e 2,\n]);\n\n/** Create */\n$invoices-\u003ecreate([\n    'wallet_id' =\u003e 23,\n    'category_id' =\u003e 3,\n    'description' =\u003e 'Pagamento Cartão',\n    'type' =\u003e 'expense',\n    'value' =\u003e '25000.20',\n    'due_at' =\u003e '2019-10-02',\n    'repeat_when' =\u003e 'single',\n    'period' =\u003e 'month',\n    'enrollments' =\u003e '1',\n]);\n\n/** Read */\n$invoices-\u003eread(91);\n\n/** Update */\n$invoiceId = 91;\n$invoices-\u003eupdate($invoiceId, [\n    'wallet_id' =\u003e 23,\n    'category_id' =\u003e 3,\n    'description' =\u003e 'Pagamento Cartão',\n    'value' =\u003e '25000.20',\n    'due_day' =\u003e 25,\n    'status' =\u003e 'paid',\n]);\n\n/** Delete */\n$invoices-\u003edelete(91);\n\n/** Test and result */\nif ($invoices-\u003eerror()) {\n    $invoices-\u003eerror(); /** Object */\n} else {\n    $invoices-\u003eresponse(); /** Object */\n}\n```\n\n### Outros\n\nVocê também conta com classes para os endpoints de carteiras e assinaturas, toda documentação de uso com exemplos práticos está disponível na pasta examples desta biblioteca. Por favor, consulte lá.\n\n###### You also have classes for endpoints of portfolios and signatures, all the documentation of use with practical examples is available in the examples folder library. Please check there.\n\n## Contribuir\n\nPor favor veja [CONTRIBUTING](https://github.com/iaematt/cafeapi/blob/master/CONTRIBUTING.md) para detalhes.\n\n## Suporte\n\nSe você descobrir algum problema relacionado à segurança, envie um e-mail para matheusbastos@outlook.com em vez de usar o rastreador de problemas.\n\n###### Security: If you discover any security related issues, please email matheusbastos@outlook.com instead of using the issue tracker.\n\nObrigado\n\n## Creditos\n\n-   [Matheus Bastos](https://github.com/iaematt) (Desenvolvedor)\n-   [UpInside Treinamentos](https://github.com/upinside) (Time)\n-   [All Contributors](https://github.com/iaematt/cafeapi/contributors) (This Rock)\n\n## Licença\n\nThe MIT License (MIT). Please see [License File](https://github.com/iaematt/cafeapi/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiaematt%2Fcafeapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiaematt%2Fcafeapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiaematt%2Fcafeapi/lists"}