-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Language API changes (in progress) - DO NOT MERGE before Nov 15 #593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# ['https://www.googleapis.com/auth/cloud-platform']) | ||
# http = httplib2.Http() | ||
# scoped_credentials.authorize(http) | ||
# return discovery.build('language', 'v1', http=http) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI you can still do this. Just add the parameter discoveryServiceUrl
:
return discovery.build(
'language', 'v1', http=http,
discoveryServiceUrl='https://{api}.googleapis.com/$discovery/rest?version={apiVersion}&labels=GOOGLE_INTERNAL')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's cool. Changes made.
@jerjou @jonparrott Please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there's a conflict with the README? Didn't Jon change all the READMEs recently?
@@ -25,13 +25,20 @@ | ||
from oauth2client.client import GoogleCredentials | ||
|
||
|
||
# TODO REMOVE - when discovery is public |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet.
@@ -38,7 +38,9 @@ where `<command>` is one of: `entities`, `sentiment`, or `syntax`. | ||
|
||
The script will write to STDOUT the json returned from the API for the requested feature. | ||
|
||
For example, if you run: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've recently updated all the READMEs to be autogenerated. Can you rebase?
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', 'v1beta1', http=http) | ||
return discovery.build('language', 'v1', | ||
http=http, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use credentials=credentials
instead of http=http
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not until discovery is public. I have added a TODO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried recently? I think there was a change to the api client recently (possibly made by Jon) that retried getting the discovery doc if it gets a permission-denied error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it didn't work. Actually retried before making the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh well :-/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
break at opening (
to avoid hanging indents. (I should make this into a t-shirt)
That bug is still open. :P On Thu, Nov 10, 2016 at 1:48 PM Jerjou notifications@github.com wrote:
|
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
CLAs look good, thanks! |
@jonparrott discovery public and pending changes made. |
No description provided.