@bratanstudio/tneu_rank

Facebook GitHub Instagram

Usage no npm install needed!

<script type="module">
  import bratanstudioTneuRank from 'https://cdn.skypack.dev/@bratanstudio/tneu_rank';
</script>

README




bratanstudio


Table of contents

Features

  • getting all data about your study process
  • what else do you need for happiness?

Installing

You can use both yarn or npm for installing. We ❤️ yarn.

yarn add @bratanstudio/tneu_rank

Wanna test it?

cd node_modules/@bratanstudio/tneu_rank && yarn test

Example

With ES8 syntax.

import Rank from '@bratanstudio/tneu_rank'

(async () => {
    const params = {}
    const body = new Rank(params)
    const json = await body.parse()
    console.log(json)
})()

Or with old ES5.

const Rank = require('@bratanstudio/tneu_rank')

const params = {}
const body = new Rank(params)
body.parse().then((json) => {
    console.log(json)
})

Request params

Original TNEU Rank website is mod.tanet.edu.te.ua. All requests are linked to this site.

| name| description | default | |--|--|--| | post |Original website login page | http://mod.tanet.edu.te.ua/site/login | |get|Original website scores page|http://mod.tanet.edu.te.ua/ratings/index| |username|Your login|| |password|Your password||

We don't store your data anywhere!

Response types

name description response error code
login error When tryna login with no login data or data is incorrect you'll get that error an error has occurred while try to login. please, check login data 1
empty error When there's no data for any semester The results is empty yet.. 2
wtf error No one knows wtf it means... Something went wrong... 3
all good All stuff works like a charm false

If you do all things the right way then you'll get the following response with all info:

field description
pib full name of user
items list of subjects (2 arrays, because there are two semesters in one year)
items.name name of the subject
items.control control type (exam, etc.)
items.exams list of all modules for the subject
exams.percentage weight of the module in percents
exams.date deadline for the module
exams.score score for the module
exams.total total score for the subject

Example output

{
       "pib": "ЛЯЩИНСЬКИЙ Петро Борисович (КІм-11)",
       "items": 
            [
                [ 
                    {
                        "name": "Дослідження мережевих операційних систем",
                        "control": "Екзамен",
                        "exams": 
                            [
                                {
                                    "percentage": "20",
                                    "date": "28.10.18",
                                    "score": "90"
                                },
                                {
                                    "percentage": "20",
                                    "date": "23.11.18",
                                    "score": "95"
                                },
                                {
                                    "percentage": "20",
                                    "date": "06.12.18",
                                    "score": "95"
                                },
                                {
                                    "percentage": "40",
                                    "date": "12.12.18",
                                    "score": "95"
                                },
                                {
                                    "total": "94"
                                }
                            ]
                    }
                ],
                [ 
                    {
                        "message": "The results is empty yet..",
                        "error": 2
                    }
                ]
            ],
       "error": false,
       "api": {
          "name": "mod.tanet Parser API",
          "ver": "2.0.1 🐋",
          "dev": {
             "name": "Petro Liashchynskyi",
             "github": "liashchynskyi",
             "org": "bratanstudio | BroStudioUA"
          },
          "prod": {
             "link": "http://rank.ml"
          }
       }
    }

License

© The code is under Apache 2.0 license. For more info, see LICENSE file.

Made with ❤️ by liashchynskyi
2019