0

In Google Tasks android app and in the web version, I have the possibility to mark a task as favorite (click that star).

Yet in the API there is no task attribute to use to get that boolean value.

Link to the Task API: https://developers.google.com/resources/api-libraries/documentation/tasks/v1/java/latest/com/google/api/services/tasks/model/Task.html

Here is how the favorite mark looks like

The version I am using is "v1-rev20210709-2.0.0":

<dependency>
    <groupId>com.google.apis</groupId>
    <artifactId>google-api-services-tasks</artifactId>
    <version>v1-rev20210709-2.0.0</version>
</dependency>

I have created a small java app that is getting all the tasks using Google Tasks API and generate a html 3 column printable format. I would bold that task when marked as favorite...

Can anybody help me read that favorite mark using Google Task API ?

2 Answers2

0

According to my understanding those tasks are added to another tasklist (the list where you added your task and another list "starred tasks", as you can see in the task manager in Gmail for example).

This tasklist is not (yet?) available through API, maybe because this feature is recent: https://9to5google.com/2022/06/21/google-tasks-star/

or maybe it is deliberate choice from Google. The API does not cover all needs to implement an alternate task manager, take a look at the overview of "tasks" object in the documentation:

https://developers.google.com/tasks/reference/rest/v1/tasks

parent, position, hidden and links fields are read only

Mathieu
  • 1
  • 1
  • Just debugged and checked the response. There is no additional list apart from my actual lists in the response beans. Somehow the web and android versions of Tasks have this feature, they must bring it in another way. Relaying on java client for Google Tasks API is not good enough, yet. I will wait – Emil Cazacu Oct 18 '22 at 11:31
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 28 '22 at 07:13
0

Seems like they haven't introduced starred tasks to their API yet. We have to wait until they provide it on the documentation.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 16 '23 at 07:25