def _get_auth_session(self): credentials = service_account.Credentials.from_service_account_file( self.credentials_path, scopes=SCOPES) http = httplib2.Http() return AuthorizedHttp(credentials, http=http)
def _init_service(self): self.service = discovery.build('calendar', 'v3', http=AuthorizedHttp( self.credentials, http=httplib2shim.Http()))