{"id":17797427,"url":"https://github.com/edsonmsouza/php-imc-api","last_synced_at":"2026-03-19T02:01:36.647Z","repository":{"id":65949907,"uuid":"515323743","full_name":"EdsonMSouza/php-imc-api","owner":"EdsonMSouza","description":"Esta API fornece um serviço que calcula o IMC (Índice de Massa Corporal) de uma pessoa. Além do recurso disponível, é uma ótima oportunidade de estudo para quem está aprendendo a desenvolver APIs.","archived":false,"fork":false,"pushed_at":"2023-01-20T01:38:46.000Z","size":33,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-01T09:45:48.128Z","etag":null,"topics":["api-rest","imc-calculator"],"latest_commit_sha":null,"homepage":"","language":"Hack","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-sa-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EdsonMSouza.png","metadata":{"files":{"readme":"README.html","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-18T19:58:24.000Z","updated_at":"2023-02-17T23:55:02.000Z","dependencies_parsed_at":"2023-02-18T00:25:14.291Z","dependency_job_id":null,"html_url":"https://github.com/EdsonMSouza/php-imc-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EdsonMSouza/php-imc-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdsonMSouza%2Fphp-imc-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdsonMSouza%2Fphp-imc-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdsonMSouza%2Fphp-imc-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdsonMSouza%2Fphp-imc-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EdsonMSouza","download_url":"https://codeload.github.com/EdsonMSouza/php-imc-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EdsonMSouza%2Fphp-imc-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30684894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-19T00:52:14.022Z","status":"online","status_checked_at":"2026-03-19T02:00:06.886Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-rest","imc-calculator"],"created_at":"2024-10-27T11:55:50.922Z","updated_at":"2026-03-19T02:01:36.614Z","avatar_url":"https://github.com/EdsonMSouza.png","language":"Hack","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP IMC API v.1.0\n\n\u003ccode\u003e\u003cimg height=\"50\" src=\"https://raw.githubusercontent.com/github/explore/80688e429a7d4ef2fca1e82350fe8e3517d3494d/topics/php/php.png\"\u003e\u003c/code\u003e\n\u003ccode\u003e\u003cimg height=\"50\" src=\"https://raw.githubusercontent.com/github/explore/80688e429a7d4ef2fca1e82350fe8e3517d3494d/topics/json/json.png\"\u003e\u003c/code\u003e\n\nEsta API fornece, de forma simples, um serviço que calcula o IMC (Índice de Massa Corporal) de uma pessoa. Além do recurso disponível, é uma ótima oportunidade de estudo para quem está aprendendo a desenvolver APIs.\n\n__ATENÇÃO__: A cada requisição são registrados os dados sobre _peso_ e _altura_ em um arquivo JSON no diretório `data`, apenas para estatísticas futuras. Os dados mantidos não permitem a identificação de uma __pessoa__.\n\n```html\nPHP 7.4.3 (cli) (built: Jun  13 2022 13:43:30) ( NTS )\nCopyright (c) The PHP Group Zend Engine v3.4.0, \nCopyright (c) Zend Technologies with Zend OPcache v7.4.3, \nCopyright (c), by Zend Technologies\n```\n\n### Como usar esse conteúdo?\n\nEste conteúdo é livre para uso e distribuição sob a licença (CC BY-SA 4.0).\n\nSe quiser colaborar neste repositório com quaisquer melhorias que você tenha feito, basta fazer um _fork_ e enviar um PR.\n\n### Composer\n\nMudanças devem ser atualizadas via \u003ccode\u003ecomposer dump-autoload -o\u003c/code\u003e no ambiente de desenvolvimento.\n\n### Como usar\n\n---\n| Resource |      URI      |  Method  |\n|:--------:|:-------------:|:--------:|\n| **API**  | `http://URI/api/` | **POST** |\n\n_**payload**_\n\n```json\n{\n  \"peso\": \"94\",\n  \"altura\": \"1.80\",\n  \"idioma\": \"br ou en\"  \n}\n```\n### Teste Online\n\nA API pode ser testada no endereço abaixo com os dados sugeridos.\n\n- URI: [https://imc-api.edsonmelo.com.br/api/)\n\n--- \n\n_**payload**_\n\n```json\n{\n  \"peso\": \"94\",\n  \"altura\": \"1.80\",\n  \"idioma\": \"br\"  \n}\n```\n_**Success**_\n\n```json\n{\n  \"language\": \"br\",\n  \"imc\": \"29.01\",\n  \"status\": \"Sobrepeso\"\n}\n```\n\n_**Warnings**_\n\n```json\n{\n  \"message\": \"Payload Precondition Failed\" or\n  \"message\": \"Invalid Arguments Number (Expected Four)\" or\n  \"message\": \"Bad Request (Invalid Syntax)\" or  \n  \"message\": \"Method Not Allowed\"\n}\n```\n\n### Como citar este conteúdo\n\n```\nSOUZA, Edson (2022, Jul 18). PHP IMC API v.1.0.\nAvailable in: https://github.com/EdsonMSouza/php-imc-api\n```\n\nOu BibTeX for LaTeX:\n\n```latex\n@misc{SOUZA2022IMCAPI,\n  author = {SOUZA, Edson},\n  title = {PHP IMC API v.1.0},\n  url = {https://github.com/EdsonMSouza/php-imc-api},\n  year = {2022},\n  month = {July}\n}\n```\n\n### Licença\n\n[![CC BY-SA 4.0][cc-by-sa-shield]][cc-by-sa]\n\nEste trabalho é licenciado sob a\n[Creative Commons Attribution-ShareAlike 4.0 International License][cc-by-sa].\n\n[![CC BY-SA 4.0][cc-by-sa-image]][cc-by-sa]\n\n[cc-by-sa]: http://creativecommons.org/licenses/by-sa/4.0/\n\n[cc-by-sa-image]: https://licensebuttons.net/l/by-sa/4.0/88x31.png\n\n[cc-by-sa-shield]: https://img.shields.io/badge/License-CC%20BY--SA%204.0-lightgrey.svg","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedsonmsouza%2Fphp-imc-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedsonmsouza%2Fphp-imc-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedsonmsouza%2Fphp-imc-api/lists"}