Javascript library for requests academic information from National University of Colombia.
Basically the library connects to the REST API from SIA University and transforms the data into readable objects.
https://github.com/siajs/sia-bower
https://github.com/siajs/sia-npm
The library is divided into 2 main functions:
sia.getSubjects()
sia.getGroups()
both functions return promises, .then()
to get the results and .catch()
to handle errors.
sia.getSubjects('foto', 'sia.bogota.unal.edu.co').then(res => {
console.log(res);
}).catch(err => {
console.log(err);
});
search: search string that contains the name from a subject.
url: url string to connect.
options: optional object to filter the search.
Name | Type | Default | Description |
---|---|---|---|
level |
String | '' |
Specify the level (pre, pos) |
type |
String | '' |
Specify the subjects type (p, b, c, l, m, o, t) |
plan |
String | '' |
Specify code of plan |
filter |
Array | [] |
Specify hours |
noPag |
Integer | 1 |
Number of page |
noRes |
Integer | 15 |
Number of results |
code: subject code.
url: url string to connect.
options: optional object to filter groups.
Name | Type | Default | Description |
---|---|---|---|
plan |
String | '' |
Specify code of plan |
filter |
Array | [] |
Specify hours |
If you want to collaborate in its development, set up your environment as follows:
$ npm install
$ npm run build
$ npm test
The MIT License (MIT)
Copyright (c) 2015 - Giorgio Acosta
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.