googleapis / google-api-python-client

🐍 The official Python client library for Google's discovery based APIs.
https://googleapis.github.io/google-api-python-client/docs/
Apache License 2.0
7.65k stars 2.39k forks source link

update discovery to include "showAssigned" #2447

Closed int-maxd closed 1 week ago

int-maxd commented 1 month ago

The Google Tasks API v1 has been updated with the ability to view assigned tasks from Spaces or Google Docs/Sheets under assignmentInfo in the task resource when returned from the API.

To pull these tasks, the flag "showAssigned" query parameters needs to be set. Currently the tasks.v1.jsonfile in the discovery cache can be updated to accomodate the query parameter by adding the "showAssigned" definition under resources > tasks > methods > list.

Example of definition required:

"resources": {
    "tasks": {
        "methods": {
            "list" : {
                "showAssigned": {
                  "description": "Flag indicating whether assigned tasks are returned in the result. Optional. The default is False.",
                  "location": "query",
                  "type": "boolean"
            },
         }
      }
    }
}
ohmayr commented 1 month ago

@int-maxd It seems the discovery artifact for tasks in the cached directory was updated a month ago already includes showAssigned.

See: tasks.v1.json#L421. This was released in google-api-python-client==2.136.0 .

Can you try the following and see if resolves the issue for you?

pip install google-api-python-client==2.136.0
ohmayr commented 1 week ago

Closing this issue as per previous comment.