Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just a few questions #29

Closed
luwol03 opened this issue Sep 21, 2020 · 11 comments
Closed

Just a few questions #29

luwol03 opened this issue Sep 21, 2020 · 11 comments
Labels

Comments

@luwol03
Copy link
Contributor

luwol03 commented Sep 21, 2020

Hello,

I have got the api docs with a email to helpdesk. And now I have a few questions.

  1. What version of the documentation you're using? And how much pages you have? (Mine is from 20.09.2018 and has 19 pages)

  2. In mine there is nothing about getting homeworks and a few other stuff. Only json rpc and nothing about a rest API. Did you figured out the rest api yourself?

  3. The guy from the untis team, who send me the documentation said:

The query interval of your program must NOT be less than 60 minutes. Otherwise the query will be blocked by the system.

Have you any experience with testing your program? Did you got blocked?

  1. And in my sheet I can't find anything about the secret authentication and anonymous login. Did you figured out this also yourself?

Best regards.

@TheNoim
Copy link
Collaborator

TheNoim commented Sep 22, 2020

Hi,

  1. What version of the documentation you're using? And how much pages you have? (Mine is from 20.09.2018 and has 19 pages)

I have the same version.

  1. In mine there is nothing about getting homeworks and a few other stuff. Only json rpc and nothing about a rest API. Did you figured out the rest api yourself?

Figured it out by myself.

  1. The guy from the untis team, who send me the documentation said:

The query interval of your program must NOT be less than 60 minutes. Otherwise the query will be blocked by the system.
Have you any experience with testing your program? Did you got blocked?

I think they don't have a blocking system which triggers that early. Never got blocked. Just don't abuse it and you should be fine. If there servers can not handle 2 request every hour, then they probably did something wrong while developing WebUntis.

  1. And in my sheet I can't find anything about the secret authentication and anonymous login. Did you figured out this also yourself?

Yes, again. I figured it out by myself. Nothing there in the official documentation.

@luwol03
Copy link
Contributor Author

luwol03 commented Sep 22, 2020

Ok, thank you very much for awnsering. I like your api wrapper.

@luwol03
Copy link
Contributor Author

luwol03 commented Sep 23, 2020

Do you know, if there is also something to get all teacher who theaches me in which lesson?

@NYC00kie
Copy link

Do you know, if there is also something to get all teacher who theaches me in which lesson?

That should be in the time table.

@TheNoim
Copy link
Collaborator

TheNoim commented Sep 23, 2020

@luwol03
Copy link
Contributor Author

luwol03 commented Sep 23, 2020

That's funny, could it be that my school blocks fetching also the teacher? This is one lesson json object Im getting.

{
  "id": 357397,
  "date": 20200922,
  "startTime": 955,
  "endTime": 1040,
  "kl": [
    {
      "id": 280,
      "name": "11",
      "longname": " (314)"
    },
    {
      "id": 285,
      "name": "11",
      "longname": "(320)"
    }
  ],
  "su": [
    {
      "id": 1,
      "name": "KR",
      "longname": "Kath. Relogion"
    }
  ],
  "ro": [
    {
      "id": 44,
      "name": "314",
      "longname": "(9d)"
    }
  ],
  "lsnumber": 9800,
  "activityType": "Unterricht"
}

@TheNoim
Copy link
Collaborator

TheNoim commented Sep 24, 2020

That's funny, could it be that my school blocks fetching also the teacher? This is one lesson json object Im getting.

It could be. Can you make a screenshot of some lessons on the webuntis page?

@luwol03
Copy link
Contributor Author

luwol03 commented Sep 24, 2020

image
It's funny, because on the web untis page I can see my teachers, but on the mobile app i can't. Could it be that webuntis fetch the data an other way like the mobile app? And the mobile app use the offfical api?

@TheNoim
Copy link
Collaborator

TheNoim commented Sep 24, 2020

Currently, there are three known apis to me:

  1. The official
  2. WebAPI (Used by the webpage)
  3. App API

However, this is the first time that I encountered that some api is missing some data. I mean, if some api is returning the data, we should be able to get it somehow. But we need to modify the api client.

@luwol03
Copy link
Contributor Author

luwol03 commented Sep 27, 2020

how do you recommend the login management? just login for one api call and then log out or leave the session valid and not logout and validate the session before every api call?

@TheNoim
Copy link
Collaborator

TheNoim commented Sep 28, 2020

how do you recommend the login management? just login for one api call and then log out or leave the session valid and not logout and validate the session before every api call?

If you really know you only do one request, you can logout. However, a session is only valid for 15 minutes. So, if you do more than one request in 15 minutes, you can just leave it. The client will refresh the session by itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants