how can i to get labels ThreadsUnread when excuting LabelsResource.ListRequest?
trying to get the ThreadsUnread property when i'm excuting the Google.Apis.Gmail.v1.UsersResource.LabelsResource.ListRequest but it comes with null value.
This is my code:
Google.Apis.Gmail.v1.UsersResource.LabelsResource.ListRequest labelReq = service.Users.Labels.List("me");
IList<Google.Apis.Gmail.v1.Data.Label> labels = labelReq.Execute().Labels;
what do i need to ask in the request the ThreadsUnread
or MessagesUnread
value?
There is a property in the request that called "fields". it can be set with a string. but where can i find what is the options of that string?
Use the Users.labels.get. In the try-it section do this:
userId: me
id: INBOX
and execute, the response would looke something like:
and there's the
"threadsUnread": 323
you're looking for.