Skip to content

Commit

Permalink
Add flow_from_config (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexim committed May 30, 2017
1 parent 9b4b943 commit 87f3fbd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions youtube/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 87f3fbd

Please sign in to comment.