diff --git a/youtube/youtube.py b/youtube/youtube.py index 9a56b89..1e92a18 100644 --- a/youtube/youtube.py +++ b/youtube/youtube.py @@ -9,6 +9,16 @@ from oauth2client.file import Storage +def flow_from_config(config): + client_secret_file_path = config["youtube"]["client_secret_file_path"] + flow = flow_from_clientsecrets( + client_secret_file_path, + scope="https://www.googleapis.com/auth/youtube", + message="Cannot find %s file. Please create it" % (client_secret_file_path) + ) + return flow + + # TODO(bc02b696-9ad8-4572-8faa-58caed05f612): authorization and credential storage # # Develop a mechanism for storing and retrieving credentials for