03-01 build() object

github documentation & youtube api documentation

01

from googleapiclient.discovery import build
import json
api_key = 'AIzaSyDzHXVBwo9IA0Y_kBHjmoEf9l66ngoj4Ag'

youtube = build('youtube', 'v3', developerKey=api_key)

The build() object sends a request to the youtube api, and returns a request object called <googleapiclient.discovery.Resource.

We use 'Instance methods' on the request object to interact with the data.

02

Documentation for the build() object can be found if you scroll down on the google-client-python api github main, Go to 'docs folder', then

'Getting Started'.
Scroll down until you see build() and click the link.

or you can go directly there clicking this link
https://github.com/googleapis/google-api-python-client/blob/main/docs/start.md

03

The required parameters for build() are the serviceName which is youtube, and the version which is 3.

The developerKey is optional, but this is where the api_key goes if you want to access specific data.

01

from googleapiclient.discovery import build
import json
api_key = 'AIzaSyDzHXVBwo9IA0Y_kBHjmoEf9l66ngoj4Ag'

youtube = build('youtube', 'v3', developerKey=api_key)
    
                

The build() object sends a request to the youtube api, and returns a a request object called <googleapiclient.discovery.Resource.

We use 'Instance methods' on the build() request object to interact with the data