android - YouTube Api for channel list -
i newer in youtube api,i need implementing youtube api in android. have find 1 youtube api getting channel list on associated username https://www.googleapis.com/youtube/v3/channels?part=snippet&forusername={username}&key={your_api_key}. have created 3 channels in youtube account above api not getting response.
this response above api valid username , api key
{ "kind": "youtube#channellistresponse", "etag": "\"i_8xdzu766_fsaexeadxtifewc0/ewwrz0vbtypp2egbokvz5m_1mbo\"", "pageinfo": { "totalresults": 0, "resultsperpage": 5 }, "items": [] }
use this:
https://www.googleapis.com/youtube/v3/channels?part=statistics&id=channel_id&key=your_key
you can try api request here: https://developers.google.com/youtube/v3/docs/channels/list#try-it
request:
http get: https://www.googleapis.com/youtube/v3/channels?part=statistics&id={channel_id}&key={your_api_key} response (with id=uct7ivnjwjbsof8ipljhctgq): { "kind": "youtube#channellistresponse", "etag": "\"dhbhldw5j8dk10gxev_ug6rsrem/wnxxcvyctyqtjtn9slj5tovjbry\"", "pageinfo": { "totalresults": 1, "resultsperpage": 1 }, "items": [ { "kind": "youtube#channel", "etag": "\"dhbhldw5j8dk10gxev_ug6rsrem/jijtua_iwn2kv9arnqeawnacq6i\"", "id": "uct7ivnjwjbsof8ipljhctgq", "statistics": { "viewcount": "796662", "commentcount": "20", "subscribercount": "257", "hiddensubscribercount": false, "videocount": "126" } } ] }
you can pass in comma-separated list of channel ids id parameter. because passed in 1 id, first object of items array have values need. object subscribercount , videocount values in statistics dictionary data want.
Comments
Post a Comment