Skip to content

Conversation

@blowmage
Copy link
Contributor

Implement some requested changes to the existing Vision implementation. Including renaming Analysis to Annotation and adding support for default max results when giving a truthy value to #annotate.

require "gcloud"
gcloud = Gcloud.new

vision = gcloud.vision

annotation = vision.annotate "path/to/faces.jpg", faces: true
# As opposed to having to pass in the numeric value
# annotation = vision.annotate "path/to/faces.jpg", faces: 10

blowmage added 2 commits May 17, 2016 14:57
Received feedback that analysis and analyses were not as preferred as
annotation and annotations. Rename class, update code examples and docs.
Add configuration for setting the default max results values.
Allow truthy values to #annotate to use the default max result values.
@blowmage blowmage added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: vision Issues related to the Cloud Vision API. labels May 18, 2016
@blowmage blowmage added this to the Vision milestone May 18, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 18, 2016
blowmage added 3 commits May 18, 2016 12:37
We want to encourage users to use boolean flags instead of setting max result
values in every method call. A custom max result value can be given, but should
be presented as a secondary option to using the boolean flag.

Update method signatures to prioritize boolean flags as default values.
@quartzmo
Copy link
Member

I think changing the syntax from faces: 10 to faces: true is a huge improvement in usability. It considerably lowers the friction to trying out the Vision service. For bulk (production) users, setting global configuration is also better. Win-win in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: vision Issues related to the Cloud Vision API. cla: yes This human has signed the Contributor License Agreement. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants