@fcitdev/json
Parser for students data from TNEU Rating System. Based on X-Ray. Written on NodeJS with ES6 support.
Last updated 2 years ago by liashchynskyi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @fcitdev/json 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.2                                ...           latest (2 years ago)

1 Versions

  • 1.0.2                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (3)
Dev Dependencies (14)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |