Moses
Moses

Reputation: 433

How to set chart parameter in YouTube Data API v3( JAVA / Android)

Hi here is my code to get videos list.

YouTube.Videos.List listVideosRequest = youtube.videos().list("snippet, contentDetails");
          listVideosRequest.setKey(apiKey);

I am not able to find a way to set chart parameter( one of the Filter option ). Actually i wanna retrieve videos list of Most popular in my region. Thanks in advance

Upvotes: 0

Views: 1290

Answers (1)

saa
saa

Reputation: 1568

Try like this. First check whether you included proper lib or not in your project. Because some times it may not show all methods. for updated library click here. Once you have updated library then

YouTube.Videos.List listVideosRequest = youtube.videos().list("snippet, contentDetails");
listVideosRequest.setChart("mostPopular");
listVideosRequest.setKey(apiKey); 

Upvotes: 1

Related Questions