Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c6b8e8d

Browse filesBrowse files
committed
fixed discovery build by removing http
1 parent 84d2f97 commit c6b8e8d
Copy full SHA for c6b8e8d

File tree

Expand file treeCollapse file tree

2 files changed

+0
-12
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+0
-12
lines changed

‎language/api/analyze.py

Copy file name to clipboardExpand all lines: language/api/analyze.py
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,12 @@
2121
import sys
2222

2323
from googleapiclient import discovery
24-
import httplib2
2524
from oauth2client.client import GoogleCredentials
2625

2726

2827
def get_service():
2928
credentials = GoogleCredentials.get_application_default()
30-
scoped_credentials = credentials.create_scoped(
31-
['https://www.googleapis.com/auth/cloud-platform'])
32-
http = httplib2.Http()
33-
scoped_credentials.authorize(http)
3429
return discovery.build('language', 'v1',
35-
http=http,
3630
credentials=credentials)
3731

3832

‎language/movie_nl/main.py

Copy file name to clipboardExpand all lines: language/movie_nl/main.py
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
from googleapiclient import discovery
2323
from googleapiclient.errors import HttpError
24-
import httplib2
2524
from oauth2client.client import GoogleCredentials
2625
import requests
2726

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

282281
credentials = GoogleCredentials.get_application_default()
283-
scoped_credentials = credentials.create_scoped(
284-
['https://www.googleapis.com/auth/cloud-platform'])
285-
http = httplib2.Http()
286-
scoped_credentials.authorize(http)
287282
return discovery.build('language', 'v1',
288-
http=http,
289283
credentials=credentials)
290284

291285

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.