1.0.2 • Published 8 years ago
@fcitdev/json v1.0.2
tanetjson-es6
Simple JSON Parser for TNEU Rating System. Used by Modern TNEU Rank (knowns as rank.ml). This version is written by ES6. The old version you can find here.
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Installing
You can install this package via npm:
npm install @fcitdev/jsonor via yarn:
yard add @fcitdev/jsonInstalling for contributing
For do experiments you need to clone the repo:
$ git clone https://github.com/fcitdev/tanetjson-es6Install dependencies:
$ cd tanetjson-es6 && npm installTest it:
$ npm run testExample script
The next source file shows you simple usage of the package.
Simple source file
import {init, authenticate, parse} from '@fcitdev/json';
init({
post: 'http://mod.tanet.edu.te.ua/site/login',
get: 'http://mod.tanet.edu.te.ua/ratings/index',
username: 'fakepassword',
password: 'fakelogin'
});
(async () => {
const body = await authenticate();
const json = await parse(body);
console.log(json);
})()Output will be similar to this:
{
"owner": "YOUR FULLNAME",
"semester": [
"Перший семестр",
"Другий семестр"
],
"items": [
{
//...//Subjects for 1st semester with all scores
},
{
//...//Subjects for 2nd semester with all scores
}
]
}License
MIT © Petro Liashchynskyi