-
Notifications
You must be signed in to change notification settings - Fork 11
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
URL is bad in notifications part of API #18
Comments
hm, sorry that you are having problems with the library. thanks for submitting an issue :) the notification URL is built like so (index.js:556) this.district.district_baseurl + notification.linkUrl + notification.linkContext, based on your screenshot it looks like the Anyways, on to fixing this. Send me the debug output and I'll get back to you ASAP. |
Thanks for the fast response!
Then it ends with stuff that looks like this:
If you need more information, feel free to let me know. |
Thanks for posting your debug output! From what I can see from the important bit here
As suspected, the notification objects returned from I.C. do not contain the
Unfortunately, I no longer have access to Infinite Campus, which makes maintaining an Infinite Campus library very difficult. Is there any way you can send me an example of the notification link from the Infinite Campus website? Maybe by right-clicking on the notification and copying the link? If not I'll have a friend get me the link format in the morning and I should be able to investigate this more. Sorry for the delay. |
The URL for that notification when you click on it is:
It looks like that the IDs in the URL are different from the one in the API sadly. |
hmm, okay that's unfortunate. let's try this new debug version and then could you send me the output labeled "[RAW NOTIFICATION PRISM OUTPUT]". This should be the raw output from the getNotification API endpoint. Feel free to anonymize anything or send the output to my email There's a chance they restructured the whole layout of the Notifications API. This will just let me get a closer look at how the data is structured. |
Okay, so the output looks like this: {"status":"OK","data":{"NotificationList":{"Notification":[{"notificationID":"660642045","userID":"231660","creationTimestamp":"01/18/2022 09:12:55 -0700","notificationTypeID":"4","read":"true","notificationText":"Leo received a score of 10 out of 10 on **** in ********","notificationTypeText":"Assignment Score Event","displayedDate":"Today, 9:12 AM","finalText":"Leo received a score of 10 out of 10 on **** in ********","finalUrl":""},{"notificationID":"660642013","userID":"231660","creationTimestamp":"01/18/2022 09:12:55 -0700","notificationTypeID":"3","read":"true","notificationText":"Leo has an updated grade of A (100.00%) in ****: QUARTER GRADE","notificationTypeText":"Grade Event","displayedDate":"Today, 9:12 AM","finalText":"Leo has an updated grade of A (100.00%) in ******* QUARTER GRADE","finalUrl":""}, Anyways, thanks for the fast response. Unfortunately, I will be offline soon for about almost a day, so I may not reply for a while. |
I had a friend with access to I.C. check it out and they are having the same issue. I'll have to look into this more. If the URL's aren't coming from the getNotifications endpoint I'm not sure where they are coming from I know @Lathryx expressed some interest in helping me maintain this library. Perhaps they could look into this? Heres a recap on what we know so far
this.district.district_baseurl + notification.linkUrl + notification.linkContext,
{
notificationID: '660642045',
userID: '231660',
creationTimestamp: '01/18/2022 09:12:55 -0700',
notificationTypeID: '4',
read: 'false',
notificationText: 'Leo received a score of 10 out of 10 on *** in ***',
notificationTypeText: 'Assignment Score Event',
displayedDate: 'Today, 9:12 AM',
finalText: 'Leo received a score of 10 out of 10 on *** in ***',
finalUrl: '',
// the below properties used to exist but now they don't
linkUrl: undefined
linkContext: undefined
} It's important to note that we should always maintain backward maintainability so any changes must support both the old and new ways of building notification URL's. Any and all help is appreciated in investigating this. |
There is an "undefinedundefined" part in the url that does not work. Is there any way I can fix this?
![image](https://user-images.githubusercontent.com/84057073/149823722-abc89c42-f6cc-4be0-a581-7d4433f8ce90.png)
The text was updated successfully, but these errors were encountered: