fatec-api is an API for Centro Paula Souza's SIGA made for students to create things based in their profile data. Created with Typescript and available as a javascript package at npm. The source code is available at Github. For suggestions/help use Github Issues or join our Discord channel.
Install
If you're at a NPM project, use:
npm install --save fatec-api
Getting Started
A quick example will show how to use it: scrapping the user name.
Using Node.js using ES6 syntax.
const fatecApi = require('fatec-api')
const myAccount = new fatecApi.Account('LOGIN', 'PASSWORD')
myAccount.getName().then(name => {
console.log(name)
// <- 'YOUR FULL NAME WITH CAPSLOCK'
})
The scrapped data is available at Account.student
, continuing the example:
myAccount.student.getName()
// <- 'YOUR FULL NAME WITH CAPSLOCK'
How it works account.getName()
This library scrap data using HTTP requests with request
and parses the HTML with cheerio
library.
The Account class does the heavy lifting. Here's the flow of Account.getName()
:
The scrapped data is later available at Account.student on an Account
instance.