Skip to content
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

language: remove verbose option #2056

Merged
merged 7 commits into from
Mar 13, 2017
Merged

language: remove verbose option #2056

merged 7 commits into from
Mar 13, 2017

Conversation

callmehiphop
Copy link
Contributor

@callmehiphop callmehiphop commented Mar 6, 2017

Closes #1782


TODOs

  • Docs
  • Tests
    • System
    • Unit

@callmehiphop callmehiphop added the api: language Issues related to the Cloud Natural Language API API. label Mar 6, 2017
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 6, 2017
@callmehiphop
Copy link
Contributor Author

@stephenplusplus before I go in and do it, my plan for the docs was to remove a lot of the params detailing the objects we return to the user in favor of just linking them to the upstream docs. Using document.annotate() as an example, I'm not sure we need to document this object so heavily if it doesn't really vary from the raw API response too much.

WDYT?

@stephenplusplus
Copy link
Contributor

I think if we're returning the raw API response, linking is good. But, if we do any re-mapping, we have to document it.

However, I think @jgeewax wanted to kill the grouping of types, which I think means we are only ever returning the raw API response. So, no special docs would be needed, if we do that.

@callmehiphop
Copy link
Contributor Author

Got it, could you PTAL at my latest changes to see if what we'll now be providing in the callback looks ok? If so, I'm going to get started on tests and docs.

@stephenplusplus
Copy link
Contributor

LGTM.

@callmehiphop
Copy link
Contributor Author

@stephenplusplus I think I'm done here if you would kindly take a look!

return function(err, annotation, apiResponse) {
try {
assert.ifError(err);

assert.strictEqual(annotation.language, 'en');

assert(is.object(annotation.sentiment));
assert(is.number(annotation.sentiment.score));

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@stephenplusplus
Copy link
Contributor

All looks good to me, just the one thing about simplifying the system test checks now that we're just passing back the raw response.

@stephenplusplus stephenplusplus merged commit c351de9 into googleapis:master Mar 13, 2017
sofisl pushed a commit that referenced this pull request Oct 11, 2022
sofisl pushed a commit that referenced this pull request Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: language Issues related to the Cloud Natural Language API API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants