SchoolUtils / WebUntis

JavaScript WebUntis API Client
https://webuntis.noim.me/
MIT License
159 stars 21 forks source link

Expand the doc #20

Closed emilylange closed 4 years ago

emilylange commented 4 years ago

I was wondering why my sessionid keeps getting invalid after roughly 10min. So I investigated a bit...

As I turns out, the official API spec says

An application should always logout as soon as possible to free system resources on the server.

I propose adding this recommendation to the sdk doc. Furthermore, it might make sense to add the official spec pdf into the repo after the license has been clarified.

I wanted to discuss it before investing some time for a then rejected PR :)

TheNoim commented 4 years ago

As far as I know the server invalidates the session just after 10 minutes. This is an expected behavior. If you use the regular webuntis web client, you also get a logout after 10 minutes. So you just suggest to add a notice to the readme or what exactly? I am not sure if I could add the pdf, because of legal reasons. Or do you suggest an auto logout? This would not make much sense, because the server invalidates the login by itself.

emilylange commented 4 years ago

I wouldn't suggest some kind of auto logout. A notice in the docs, not the readme, would be great. Something similar to the quote above maybe (+ info about getting kicked by the server when idling for 10min). What do you think about linking the pdf from another repo where it's already public?

TheNoim commented 4 years ago

What do you think about linking the pdf from another repo where it's already public?

This is new for me. So far as I know you need to request it by sending an email. This at least is what I always did. And I was not able to find it with a quick google search.

emilylange commented 4 years ago

I found it here some time ago. Don't know if he did this on purpose. That's why I'm asking.

TheNoim commented 4 years ago

As far as I aware of you are not allowed to upload the pdf. Btw this is an old document. The API didn't change much, but I have one from 2018.

However, I agree that I should add a note. Will probably add a note to https://noim.me/WebUntis/WebUntis.html#login

emilylange commented 4 years ago

As far as I aware of you are not allowed to upload the pdf. Btw this is an old document.

Okay, good to know.

Will you add a notice in the readme that you need to email untis directly to get the official doc with a little more information for each API response? If not, that's fine.

You can close this issue when you are done :) Thanks