Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions language/api/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,12 @@
import sys

from googleapiclient import discovery
import httplib2
from oauth2client.client import GoogleCredentials


def get_service():
credentials = GoogleCredentials.get_application_default()
scoped_credentials = credentials.create_scoped(
['https://www.googleapis.com/auth/cloud-platform'])
http = httplib2.Http()
scoped_credentials.authorize(http)
return discovery.build('language', 'v1',
http=http,
credentials=credentials)


Expand Down
6 changes: 0 additions & 6 deletions language/movie_nl/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

from googleapiclient import discovery
from googleapiclient.errors import HttpError
import httplib2
from oauth2client.client import GoogleCredentials
import requests

Expand Down Expand Up @@ -280,12 +279,7 @@ def get_service():
"""Build a client to the Google Cloud Natural Language API."""

credentials = GoogleCredentials.get_application_default()
scoped_credentials = credentials.create_scoped(
['https://www.googleapis.com/auth/cloud-platform'])
http = httplib2.Http()
scoped_credentials.authorize(http)
return discovery.build('language', 'v1',
http=http,
credentials=credentials)


Expand Down