@fcitdev/json

Parser for students data from TNEU Rating System. Based on X-Ray. Written on NodeJS with ES6 support.

Usage no npm install needed!

<script type="module">
  import fcitdevJson from 'https://cdn.skypack.dev/@fcitdev/json';
</script>

README

es babel jest lint


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/json

or via yarn:

yard add @fcitdev/json

Installing for contributing

For do experiments you need to clone the repo:

$ git clone https://github.com/fcitdev/tanetjson-es6

Install dependencies:

$ cd tanetjson-es6 && npm install

Test it:

$ npm run test

Example 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