itachi1706 / CheesecakeUtilities

A group of utility stuff that I use on my phone :D
MIT License
2 stars 1 forks source link

Explore if MSL integration is possible #258

Closed itachi1706 closed 5 years ago

itachi1706 commented 5 years ago

Check if it is viable to integrate with MSL School Planning app that I'm using so that it can sync with GCal and basically everything else

Exploration Phase (if it works we can go ahead)

Implementation

Sent from my LG G7 ThinQ using FastHub

itachi1706 commented 5 years ago

If it doesn't work we need to see if we can somehow hijack the login token. If we can do that it can replace the login instead

itachi1706 commented 5 years ago

Some basic packets are saved on the NAS. Review them I guess

itachi1706 commented 5 years ago

Actually check if all we need is the access token. If so we can just request for that instead of doing the whole login flow (cause I'm lazy and this is more for expert use)

itachi1706 commented 5 years ago

Okay, we are able to retrieve stuff as long as we have the authorization token. An API endpoint is created to retrieve said information. So for now we will just use said token to get the synchronization data. Need to get a way to easily obtain said token but maybe in the future we will use OAuth. for now this is sufficient

http://api.itachi1706.com/api/mobile/msl_api.php?authorization=<token>

itachi1706 commented 5 years ago

Easy way to obtain token. 1) Login to the website with a browser 2) Access Local Storage on the browser's developer tools (Chrome: F12->Application->Local Storage, Firefox: F12->Storage->Local Storage) 3) Access token is found with key "_"

itachi1706 commented 5 years ago

Google Calendar v3 API References Google Calendar Library Sample Google Calendar Library Download

itachi1706 commented 5 years ago

Event IDs will be in this format so that we can retrieve it at the end

msl-<task/exam guid>

Also reminders should be removed if the task is completed (100%)

itachi1706 commented 5 years ago

Handle this

{
"error": "access_token_expired",
"error_message": "Thesupplied access token has expired or marked as void.",
"error_detail": null
}
itachi1706 commented 5 years ago

Handle this

{
"error": "access_token_expired",
"error_message": "Thesupplied access token has expired or marked as void.",
"error_detail": null
}

Resolved

Event IDs will be in this format so that we can retrieve it at the end

msl-<task/exam guid>

Also reminders should be removed if the task is completed (100%)

Implemented

itachi1706 commented 5 years ago

Moved sync schedule feature to a future request (#260)

itachi1706 commented 5 years ago

As soon as PR completes we can merge this 😄