{"id":17912524,"url":"https://github.com/micalevisk/my-node-rest-api","last_synced_at":"2026-04-12T18:45:00.037Z","repository":{"id":70579155,"uuid":"82428255","full_name":"micalevisk/my-node-rest-api","owner":"micalevisk","description":":x: [deprecated] REST API with Node.js, Express 4 \u0026 MongoDB 🚧","archived":false,"fork":false,"pushed_at":"2017-02-28T16:43:39.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T20:47:28.386Z","etag":null,"topics":["api","body-parser","es5-javascript","express","javascript","nodejs","rest"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/micalevisk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-19T01:50:23.000Z","updated_at":"2018-08-16T00:52:04.000Z","dependencies_parsed_at":"2023-06-09T15:15:06.960Z","dependency_job_id":null,"html_url":"https://github.com/micalevisk/my-node-rest-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micalevisk%2Fmy-node-rest-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micalevisk%2Fmy-node-rest-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micalevisk%2Fmy-node-rest-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/micalevisk%2Fmy-node-rest-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/micalevisk","download_url":"https://codeload.github.com/micalevisk/my-node-rest-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246952273,"owners_count":20859811,"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","body-parser","es5-javascript","express","javascript","nodejs","rest"],"created_at":"2024-10-28T19:45:42.975Z","updated_at":"2026-04-12T18:44:54.992Z","avatar_url":"https://github.com/micalevisk.png","language":"JavaScript","readme":"# My first REST API\n\u003e todo example [Creating a Simple RESTful Web App with Node.js, Express, and MongoDB](http://cwbuecheler.com/web/tutorials/2014/restful-web-app-node-express-mongodb/) \u003cbr\u003e\n\u003e vide [Node API Examples](https://github.com/laedanthehuman/node-api-examples) \u003cbr\u003e\n\u003e vide [Design de API REST, em 7 dicas simples](http://sensedia.com/blog/apis/design-de-api-rest) \u003cbr\u003e\n\u003e vide [Construindo uma API Rest com ExpressJS - NodeJS](https://pt-br.eventials.com/wbruno.moraes/construindo-uma-api-rest-com-expressjs-nodejs-2/) \u003cbr\u003e\n\u003e vide [Build a RESTful API Using Node and Express 4](https://scotch.io/tutorials/build-a-restful-api-using-node-and-express-4) \u003cbr\u003e\n\u003e read [Boas Práticas JS](https://github.com/wbruno/boas-praticas-js) \u003cbr\u003e\n\u003e view api doc sample https://github.com/justintv/Twitch-API/blob/master/v3_resources/channels.md \u003cbr\u003e\n\u003e view api doc sample https://github.com/yagop/node-telegram-bot-api/blob/master/doc/api.md \u003cbr\u003e\n\u003e view content dispose https://github.com/typicode/json-server \u003cbr\u003e\n\u003e vide JADE example [How to Use Jade and Handlebars in Express.js](https://webapplog.com/jade-handlebars-express/) \u003cbr\u003e\n\n# ¬ TODO\n- [ ] documentação na página HTML\n- [ ] exemplos de cada método (usando o cURL)\n- [ ] autenticação OAuth 2.0\n- [ ] organizar seguindo:\n\t```\n\t.\n\t├── app.js\n\t├── package.json\n\t├── README.md\n\t├── bin\n\t│   └── www\n\t├── public\n\t│   ├── javascripts\n\t│   │    └── global.js\n\t│   └── stylesheets\n\t│        └── style.css\n\t├── routes\n\t│   ├── index.js\n\t│   ├── usuarios.js\n\t│   ├── index.js\n\t│   └── questoes.js\n\t├── models\n\t│   ├── bean\n\t│   │    ├── usuarios.js\n\t│   │    └── questoes.js\n\t│   └── dao\n\t│        ├── usuarios.js\n\t│        └── questoes.js\n\t└── views\n\t\t├── index.jade\n\t\t└── layout.jade\n\t```\n\n----------\n\n# § métodos\n\n## GET geral AKA endpoints\n- [x] `~/usuarios` recupera os usuários\n- [x] `~/questoes` recupera as questões\n- [x] `~/infos` recupera informações gerais sobre o estado corrente da lista\n\n### ~ USUARIOS\n- [x] `GET    ~/usuarios/:username` recupera informações de um usuário\n- [x] `GET    ~/search/usuarios/:username` recupera informações de um usuário (substituir o de cima ^)\n- [ ] `POST   ~/usuarios/:username?...` insere um usuário (se não houver um com o mesmo nick)\n- [ ] `PUT    ~/usuarios/:username?...` altera as informações de um usuário\n- [ ] `DELETE ~/usuarios/:username` apaga um usuário pelo seu nick\n- [x] `POST   ~/usuarios/:username/adicionarQuestao?numero=...\u0026pendente=...` adiciona uma questão (número) à lista de questões (e pendências) do usuário\n- [ ] `DELETE ~/usuarios/:username/removerPendente?numero=...` remove uma questão (número) da lista de pendências do usuário\n- [ ] `DELETE ~/usuarios/:username/removerQuestao?numero=...` remove uma questão (número) da lista de questões e pendências do usuário\n\n### ~ QUESTOES \n- [x] `GET    ~/questoes/:numero` recupera informações de uma questão pelo seu número\n- [x] `GET    ~/search/questoes/:numero` recupera informações de uma questão pelo seu número (substituir o de cima ^)\n- [x] `POST   ~/questoes?numero=...\u0026enunciado=...` insere uma *nova* questão\n- [x] `PUT    ~/questoes/:numero` altera as informações de uma questão pelo seu número\n- [x] `DELETE ~/questoes/:numero` apaga uma questão pelo seu número\n\n### ~ INFOS\n- [x] `PUT ~/infos?...` altera as informações globais\n\n---\n\n\u003c!--\n### `GET /usuarios/:username`\n\n|\tParam\t |\tType\t  | Description\t\t\t|\n|:----------:|:----------:|:-------------------:|\n| *username* | `String`\t  | nick do Telegram\t|\n\n\u003e retorna:\n```js\n{\n\tusername: \"\",\n\tquestoes: [],\n\tpendentes: []\t\n}\n```\n--\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicalevisk%2Fmy-node-rest-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicalevisk%2Fmy-node-rest-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicalevisk%2Fmy-node-rest-api/lists"}