Question

How do I get the unreadCount value using the YouTube client library?

I think this is a new tag in the YouTube Data API, but I can't find the API method to get it. I can only get some values through SubscriptionEntry:

SubscriptionFeed feed = service.getFeed(new URL(feedUrl), SubscriptionFeed.class);

for(SubscriptionEntry entry : feed.getEntries()) {
    System.out.println("Title: " + entry.getTitle().getPlainText());
    System.out.println("Feed Url: " + entry.getFeedUrl());
    System.out.println("CountHint: " + entry.getCountHint());
}
Était-ce utile?

La solution

What you are looking is "contentDetails.newItemCount"

You can het it via getContentDetails().getNewItemCount()

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top