{"id":16209713,"url":"https://github.com/filipemeneses/fatec-api","last_synced_at":"2025-10-04T20:09:01.413Z","repository":{"id":27536990,"uuid":"114292911","full_name":"filipemeneses/fatec-api","owner":"filipemeneses","description":"API for SIGA from Centro Paula Souza made for students to create things based in their profile data","archived":false,"fork":false,"pushed_at":"2023-09-27T21:10:44.000Z","size":247,"stargazers_count":59,"open_issues_count":4,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T08:19:00.226Z","etag":null,"topics":["api","fatec","fatec-api","profile-data","scrapper","siga"],"latest_commit_sha":null,"homepage":"https://filipemeneses.gitbooks.io/fatec-api/","language":"TypeScript","has_issues":true,"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/filipemeneses.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-14T20:21:29.000Z","updated_at":"2025-02-17T23:15:12.000Z","dependencies_parsed_at":"2022-08-07T13:00:28.008Z","dependency_job_id":null,"html_url":"https://github.com/filipemeneses/fatec-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/filipemeneses%2Ffatec-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipemeneses%2Ffatec-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipemeneses%2Ffatec-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipemeneses%2Ffatec-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filipemeneses","download_url":"https://codeload.github.com/filipemeneses/fatec-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814864,"owners_count":20352037,"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","fatec","fatec-api","profile-data","scrapper","siga"],"created_at":"2024-10-10T10:31:57.186Z","updated_at":"2025-10-04T20:09:01.334Z","avatar_url":"https://github.com/filipemeneses.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fatec-api\n\n[![Travis branch](https://img.shields.io/travis/filipemeneses/fatec-api/master.svg)]()\n[![npm](https://img.shields.io/npm/v/fatec-api.svg)]()\n\nAPI for SIGA from Centro Paula Souza made for students to create scripts based in their profile data.\n\n# Usage\n\nInstall the package:\n\n```sh\nnpm install fatec-api --save\n```\n\nCheck the documentation at: https://filipemeneses.gitbooks.io/fatec-api/\n\n## Getting Started\n\nA quick example will show how to use it, scrapping the user name. And will cover the usage with [Node.js](https://nodejs.org/en/) using ES6 syntax.\n\n```js\nconst fatecApi = require('fatec-api')\nconst myAccount = new fatecApi.Account('LOGIN', 'PASSWORD')\n\nmyAccount.login().then(() =\u003e {\n  return myAccount.getName().then(name =\u003e {\n    console.log(name)\n    // \u003c- 'YOUR FULL NAME WITH CAPSLOCK'\n  })\n})\n```\n\n# How it works\n\nThis library scrap data using HTTP requests with `request` and parses the HTML with `cheerio` library.\n\nThe `auth/Account` class does the heavy lifting, making the requests using `core/Network`. The scrapped data is later available at the attribute `student` of the `auth/Account` instance.\n\nHere's the flow of `account.getName()`:\n\n![](https://cdn.rawgit.com/filipemeneses/fatec-api-doc/cf3a990f/assets/requests.svg)\n\n\nCheck out the [documentation](https://filipemeneses.gitbooks.io/fatec-api/) for more info.\n\n# Documentation\n\nAvailable at: https://filipemeneses.gitbooks.io/fatec-api/\n\n# Discussion\n\nAvailable at: https://discord.gg/RUv5Kxw\n\n# Development\n\n1. **Clone:**\n```sh\ngit clone https://github.com/filipemeneses/fatec-api.git\ncd fatec-api\n```\n2. **Install:**\n```sh\nnpm i\n```\n3. **Test:**\n\n  Create the `.env` file in the root with the required values to test.\n  ```\n  LOGIN=TEST\n  PASSWORD=TEST\n  NAME=TEST\n  ```\n\n  There is two important test files to keep track with:\n\n  - `tests/FatecApi.test.ts` to test the library features\n  ```sh\n  npm run test:api\n  ```\n\n  - `tests/Siga.test.ts` to test the integrity of SIGA (check if scrapped tags remains the same)\n  ```sh\n  npm run test:siga\n  ```\n\n  To test all:\n  ```sh\n  npm run test\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipemeneses%2Ffatec-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilipemeneses%2Ffatec-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipemeneses%2Ffatec-api/lists"}