0.1.1 • Published 4 years ago

get-sigaa v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

get-sigaa

Repositório não-oficial responsável por pegar informações do sistema SIGAA.

Em desenvolvimento


Sistemas SIGAA Testados:

  • IFPA: sigaa.ifpa.edu.br (3.12.41)
  • UFOPA: sigaa.ufopa.edu.br (3.42.12)

Instalação

Com npm:

npm install --save get-sigaa

Com yarn:

yarn add get-sigaa

Exemplo

const Sigaa = require('get-sigaa');
const fs = require('fs');

/**
  * Example File
  */

// IFPA
const ifpa =  new  Sigaa({
	institution:  'IFPA',
	debug:  true,
});

(async () => fs.writeFileSync('./ifpa.json', JSON.stringify(await ifpa.getStudentsFromCourse(204))))();
(async () => fs.writeFileSync('./ifpa2.json', JSON.stringify(await ifpa.getCourses())))();


// UFOPA
const ufopa =  new  Sigaa({
	institution:  'UFOPA',
	debug:  true,
});

(async () => fs.writeFileSync('./ufopa.json', JSON.stringify(await ufopa.getCourses())))();

API

  • constructor
  • getCourses
  • getStudentsFromCourse

constructor(config)

Inicia a classe do SIGAA com algumas configurações

ParamDesc
configConfiguração do Sigaa
config.urlURL customizada (Sobrescreve o da instituição)
config.url.baseBase da URL do site
config.url.homeCaminho para tela inicial
config.institutionSigla da Instituição. Valores: ifpa, ufopa (Mais valores e customização completa em breve)
config.debugMostrar mensagens de log durante a execução

getCourses()

Pega uma lista de cursos separado por categoria

SuporteInstituição
✔️IFPA
✔️UFOPA

Retorno (Exemplo UFOPA):

[
	{
		"modalidade":  "Graduação",
		"categorias": [
			{
				"categoria":  "CALE - CAMPUS UNIVERSITÁRIO DE ALENQUER",
				"cursos": [
					{
						"Nome":  "ADMINISTRAÇÃO",
						"Sede":  "Alenquer",
						"Modalidade":  "Presencial",
						"Coordenador":  "JORGIENE DOS SANTOS OLIVEIRA",
						"Link":  "portal.jsf?id=302729794&lc=pt_BR&nivel=G"
					}
				]
			},
		]
	}
]

getStudentsFromCourse(courseId)

Pega a lista de estudantes de um determinado curso

ParamDesc
courseIdID do curso, pode ser pego na lista de cursos do SIGAA

SuporteInstituição
✔️IFPA
UFOPA

Retorno:

[
	{
		"Matrícula":  "xxx",
		"Aluno":  "Nome da Pessoa",
		"Ano/Período de ingresso":  "2020/1"
	}
]