list
The github documentation is not good for nested 'Instance Methods', go to the youtube api references page
https://developers.google.com/youtube/v3/docs
On the channels() reference page, you can see what we can pass into the
required paramater of list().
part. We are interested in 'statistics'.
but all are available for use
Going back to the github documentation, we can see that we can get the 'statistics' of a page by also supplying a forUsername value.
This is a fully functional request using all the info
from googleapiclient.discovery import build
import json
api_key = 'AIzaSyDzHXVBwo9IA0Y_kBHjmoEf9l66ngoj4Ag'
youtube = build('youtube', 'v3', developerKey=api_key)
request = youtube.channels().list(
part='statistics',
forUsername='schafer5'
)
response = request.execute()
print(response)