-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Implement Parent API #61
Comments
In the request you showed, |
Ok so more like: if (this.session?.user && this.data?._Signature_) {
if (this.session.information.accountKind === AccountKind.PARENT) {
const kid = this.session.user.resources.at(0);
this.data._Signature_.membre = {
N: kid?.id,
G: kid?.kind,
};
}
} |
Yes it would work, I wonder which requests requires this. Also I wonder where I should let the developer switch to/use another resource (kid for example)... |
I'm thinking of a state in You could switch by doing API requests will then use that value from |
can be mutated using the `pronote.use(session, value)` helper method
Decided to go on this That mutates the new That allows for simpler retrieving of the current selected user, that's very cool since it cleans up a lot of the code ! Now, I have to write the differences in requests for parents only. |
looks good |
From what I can see navigating through the pronote web site, the |
It would be nice to implement parent api.
From the very limited tests I've done, it seems to be the student api with an additionnal field in signature to tell which resource to impersonate.
Adding those few lines in
request-function.ts
did the trick in my little test:I don't know what the 4 is for :)
The text was updated successfully, but these errors were encountered: