ETS-Next-Gen / writing_observer

Writing Observer and Learning Observer: A system for monitoring learning process data, with an initial focus on writing process data from Google Docs.
https://learning-observer.readthedocs.io/en/latest/
GNU Affero General Public License v3.0
11 stars 9 forks source link

Add ability to fetch Google Doc API from extension #194

Open bradley-erickson opened 2 weeks ago

bradley-erickson commented 2 weeks ago

We ought to be able to fetch information about a given Google Document from the extension via the Google Docs API.

This is possible to do; however, we need to add a few permission related settings to the extension's manifest.json file. We need to add an oauth2 section to the manifest detailing our client_id (from the Google API portal) and the scopes we wish to use (https://www.googleapis.com/auth/documents.readonly).

Once this is added, we should be able to call chrome.identity.getAuthToken() to fetch the user's OAuth token and include it in our headers when we query the Google Docs API for a specific document.

If data about a given document is successfully received, we should send it back to Learning Observer. The returned data will be in this structure.

bradley-erickson commented 2 weeks ago

Some additional links that may be useful to whoever works on this: