ArgLab / ArgLab/writing_observer

Add ability to fetch Google Doc API from extension

Open
#194 1 comment 0 reactions 0 assignees View on GitHub
enhancement javascript
Dominant language
Python
Stars
12
Forks
11
PR merge metrics
No merged PRs in 30d

Description

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](https://developers.google.com/docs/api/reference/rest/v1/documents#Document).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the extension's manifest.json and the planned chrome.identity.getAuthToken() call; compare the requested scope and API response with the linked Google Docs Document structure. Done means a given document can be queried with the OAuth token and the returned data is sent back to Learning Observer.

Written by the indexing model from the issue text.

Assessment

Domain
api, authentication
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.