librus-api
librus-api copied to clipboard
ERR_BAD_REQUEST on getting timetable
Hello,
I tried to use client.calendar.getTimetable() and got a 404 AxiosError.
Code:
"use strict";
const Librus = require('librus-api');
const client = new Librus();
client.authorize('<login>', '<password>').then(function ()
{
client.calendar.getTimetable().then((data) => {console.log(data)});
});
Error:
C:\Users\jozek\Developer\librus\node_modules\axios\dist\node\axios.cjs:1913
reject(new AxiosError(
^
AxiosError: Request failed with status code 404
...
The response also has this html content (part of it):
' <h3>Błąd HTTP 404.0 — Not Found</h3> \n' +
' <h4>Zasób, do którego chcesz uzyskać dostęp, został usunięty, jego nazwa uległa zmianie lub jest okresowo niedostępny.</h4> \n' +
I don't know if this is a Librus configuration issue by my school administrator or a librus-api bug...? Please let me know!
Wygląda jakby zmienili nazwę linku, z którego odczytywane były wartości. Byłbym wdzięczny, w imieniu społeczności, za naprawę w formie PRki. Od dawna już nie mam dostępu do librusa :/ Jesteś w stanie zerknąć?