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());
}
Was it helpful?

Solution

What you are looking is "contentDetails.newItemCount"

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top