| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,21 +25,15 @@ | |||
| 25 | 25 | from oauth2client.client import GoogleCredentials | |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | - # TODO REMOVE - when discovery is public | ||
| 29 | - DISCOVERY_URL = ('https://language.googleapis.com/$discovery/rest?' | ||
| 30 | - 'version=v1&labels=GOOGLE_INTERNAL') | ||
| 31 | - | ||
| 32 | - | ||
| 33 | 28 | def get_service(): | |
| 34 | 29 | credentials = GoogleCredentials.get_application_default() | |
| 35 | 30 | scoped_credentials = credentials.create_scoped( | |
| 36 | 31 | ['https://www.googleapis.com/auth/cloud-platform']) | |
| 37 | 32 | http = httplib2.Http() | |
| 38 | 33 | scoped_credentials.authorize(http) | |
| 39 | - # TODO Change to credentials=credentials | ||
| 40 | 34 | return discovery.build('language', 'v1', | |
| 41 | 35 | http=http, | |
| 42 | - discoveryServiceUrl=DISCOVERY_URL) | ||
| 36 | + credentials=credentials) | ||
| 43 | 37 | ||
| 44 | 38 | ||
| 45 | 39 | def get_native_encoding_type(): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments