google-cloud-vision 0.31.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +2 -9
- data/LICENSE +1 -1
- data/README.md +94 -0
- data/lib/google/cloud/vision.rb +200 -535
- data/lib/google/cloud/vision/v1.rb +129 -55
- data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb +9 -0
- data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search.rb +88 -0
- data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search_service.rb +539 -0
- data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/text_annotation.rb +3 -3
- data/lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/web_detection.rb +2 -1
- data/lib/google/cloud/vision/{version.rb → v1/doc/google/protobuf/empty.rb} +13 -6
- data/lib/google/cloud/vision/v1/doc/google/protobuf/field_mask.rb +230 -0
- data/lib/google/cloud/vision/v1/doc/google/protobuf/timestamp.rb +109 -0
- data/lib/google/cloud/vision/v1/geometry_pb.rb +1 -0
- data/lib/google/cloud/vision/v1/helpers.rb +972 -0
- data/lib/google/cloud/vision/v1/image_annotator_client.rb +4 -4
- data/lib/google/cloud/vision/v1/image_annotator_pb.rb +5 -0
- data/lib/google/cloud/vision/v1/image_annotator_services_pb.rb +2 -1
- data/lib/google/cloud/vision/v1/product_search_client.rb +1337 -0
- data/lib/google/cloud/vision/v1/product_search_client_config.json +116 -0
- data/lib/google/cloud/vision/v1/product_search_pb.rb +45 -0
- data/lib/google/cloud/vision/v1/product_search_service_pb.rb +191 -0
- data/lib/google/cloud/vision/v1/product_search_service_services_pb.rb +224 -0
- data/lib/google/cloud/vision/v1p3beta1.rb +233 -0
- data/lib/google/cloud/vision/v1p3beta1/credentials.rb +42 -0
- data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/geometry.rb +72 -0
- data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/image_annotator.rb +763 -0
- data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search.rb +154 -0
- data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search_service.rb +533 -0
- data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/text_annotation.rb +254 -0
- data/lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/web_detection.rb +101 -0
- data/lib/google/cloud/vision/v1p3beta1/doc/google/longrunning/operations.rb +93 -0
- data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/any.rb +130 -0
- data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/empty.rb +29 -0
- data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/field_mask.rb +230 -0
- data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/timestamp.rb +109 -0
- data/lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/wrappers.rb +90 -0
- data/lib/google/cloud/vision/v1p3beta1/doc/google/rpc/status.rb +84 -0
- data/lib/google/cloud/vision/v1p3beta1/doc/google/type/color.rb +156 -0
- data/lib/google/cloud/vision/v1p3beta1/doc/google/type/latlng.rb +65 -0
- data/lib/google/cloud/vision/v1p3beta1/geometry_pb.rb +43 -0
- data/lib/google/cloud/vision/v1p3beta1/helpers.rb +972 -0
- data/lib/google/cloud/vision/v1p3beta1/image_annotator_client.rb +302 -0
- data/lib/google/cloud/vision/v1p3beta1/image_annotator_client_config.json +36 -0
- data/lib/google/cloud/vision/v1p3beta1/image_annotator_pb.rb +304 -0
- data/lib/google/cloud/vision/v1p3beta1/image_annotator_services_pb.rb +55 -0
- data/lib/google/cloud/vision/v1p3beta1/product_search_client.rb +1351 -0
- data/lib/google/cloud/vision/v1p3beta1/product_search_client_config.json +116 -0
- data/lib/google/cloud/vision/v1p3beta1/product_search_pb.rb +64 -0
- data/lib/google/cloud/vision/v1p3beta1/product_search_service_pb.rb +191 -0
- data/lib/google/cloud/vision/v1p3beta1/product_search_service_services_pb.rb +222 -0
- data/lib/google/cloud/vision/v1p3beta1/text_annotation_pb.rb +94 -0
- data/lib/google/cloud/vision/v1p3beta1/web_detection_pb.rb +51 -0
- metadata +53 -122
- data/AUTHENTICATION.md +0 -179
- data/CHANGELOG.md +0 -109
- data/CODE_OF_CONDUCT.md +0 -40
- data/CONTRIBUTING.md +0 -188
- data/LOGGING.md +0 -32
- data/OVERVIEW.md +0 -202
- data/TROUBLESHOOTING.md +0 -37
- data/lib/google-cloud-vision.rb +0 -146
- data/lib/google/cloud/vision/annotate.rb +0 -303
- data/lib/google/cloud/vision/annotation.rb +0 -553
- data/lib/google/cloud/vision/annotation/crop_hint.rb +0 -126
- data/lib/google/cloud/vision/annotation/entity.rb +0 -225
- data/lib/google/cloud/vision/annotation/face.rb +0 -1497
- data/lib/google/cloud/vision/annotation/normalized_vertex.rb +0 -76
- data/lib/google/cloud/vision/annotation/object_localization.rb +0 -115
- data/lib/google/cloud/vision/annotation/properties.rb +0 -220
- data/lib/google/cloud/vision/annotation/safe_search.rb +0 -153
- data/lib/google/cloud/vision/annotation/text.rb +0 -1015
- data/lib/google/cloud/vision/annotation/vertex.rb +0 -91
- data/lib/google/cloud/vision/annotation/web.rb +0 -420
- data/lib/google/cloud/vision/credentials.rb +0 -57
- data/lib/google/cloud/vision/image.rb +0 -832
- data/lib/google/cloud/vision/location.rb +0 -98
- data/lib/google/cloud/vision/project.rb +0 -367
- data/lib/google/cloud/vision/service.rb +0 -83
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# source: google/cloud/vision/v1p3beta1/text_annotation.proto
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
require 'google/api/annotations_pb'
|
|
8
|
+
require 'google/cloud/vision/v1p3beta1/geometry_pb'
|
|
9
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
10
|
+
add_message "google.cloud.vision.v1p3beta1.TextAnnotation" do
|
|
11
|
+
repeated :pages, :message, 1, "google.cloud.vision.v1p3beta1.Page"
|
|
12
|
+
optional :text, :string, 2
|
|
13
|
+
end
|
|
14
|
+
add_message "google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage" do
|
|
15
|
+
optional :language_code, :string, 1
|
|
16
|
+
optional :confidence, :float, 2
|
|
17
|
+
end
|
|
18
|
+
add_message "google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak" do
|
|
19
|
+
optional :type, :enum, 1, "google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType"
|
|
20
|
+
optional :is_prefix, :bool, 2
|
|
21
|
+
end
|
|
22
|
+
add_enum "google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType" do
|
|
23
|
+
value :UNKNOWN, 0
|
|
24
|
+
value :SPACE, 1
|
|
25
|
+
value :SURE_SPACE, 2
|
|
26
|
+
value :EOL_SURE_SPACE, 3
|
|
27
|
+
value :HYPHEN, 4
|
|
28
|
+
value :LINE_BREAK, 5
|
|
29
|
+
end
|
|
30
|
+
add_message "google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty" do
|
|
31
|
+
repeated :detected_languages, :message, 1, "google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage"
|
|
32
|
+
optional :detected_break, :message, 2, "google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak"
|
|
33
|
+
end
|
|
34
|
+
add_message "google.cloud.vision.v1p3beta1.Page" do
|
|
35
|
+
optional :property, :message, 1, "google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty"
|
|
36
|
+
optional :width, :int32, 2
|
|
37
|
+
optional :height, :int32, 3
|
|
38
|
+
repeated :blocks, :message, 4, "google.cloud.vision.v1p3beta1.Block"
|
|
39
|
+
optional :confidence, :float, 5
|
|
40
|
+
end
|
|
41
|
+
add_message "google.cloud.vision.v1p3beta1.Block" do
|
|
42
|
+
optional :property, :message, 1, "google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty"
|
|
43
|
+
optional :bounding_box, :message, 2, "google.cloud.vision.v1p3beta1.BoundingPoly"
|
|
44
|
+
repeated :paragraphs, :message, 3, "google.cloud.vision.v1p3beta1.Paragraph"
|
|
45
|
+
optional :block_type, :enum, 4, "google.cloud.vision.v1p3beta1.Block.BlockType"
|
|
46
|
+
optional :confidence, :float, 5
|
|
47
|
+
end
|
|
48
|
+
add_enum "google.cloud.vision.v1p3beta1.Block.BlockType" do
|
|
49
|
+
value :UNKNOWN, 0
|
|
50
|
+
value :TEXT, 1
|
|
51
|
+
value :TABLE, 2
|
|
52
|
+
value :PICTURE, 3
|
|
53
|
+
value :RULER, 4
|
|
54
|
+
value :BARCODE, 5
|
|
55
|
+
end
|
|
56
|
+
add_message "google.cloud.vision.v1p3beta1.Paragraph" do
|
|
57
|
+
optional :property, :message, 1, "google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty"
|
|
58
|
+
optional :bounding_box, :message, 2, "google.cloud.vision.v1p3beta1.BoundingPoly"
|
|
59
|
+
repeated :words, :message, 3, "google.cloud.vision.v1p3beta1.Word"
|
|
60
|
+
optional :confidence, :float, 4
|
|
61
|
+
end
|
|
62
|
+
add_message "google.cloud.vision.v1p3beta1.Word" do
|
|
63
|
+
optional :property, :message, 1, "google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty"
|
|
64
|
+
optional :bounding_box, :message, 2, "google.cloud.vision.v1p3beta1.BoundingPoly"
|
|
65
|
+
repeated :symbols, :message, 3, "google.cloud.vision.v1p3beta1.Symbol"
|
|
66
|
+
optional :confidence, :float, 4
|
|
67
|
+
end
|
|
68
|
+
add_message "google.cloud.vision.v1p3beta1.Symbol" do
|
|
69
|
+
optional :property, :message, 1, "google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty"
|
|
70
|
+
optional :bounding_box, :message, 2, "google.cloud.vision.v1p3beta1.BoundingPoly"
|
|
71
|
+
optional :text, :string, 3
|
|
72
|
+
optional :confidence, :float, 4
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
module Google
|
|
77
|
+
module Cloud
|
|
78
|
+
module Vision
|
|
79
|
+
module V1p3beta1
|
|
80
|
+
TextAnnotation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.TextAnnotation").msgclass
|
|
81
|
+
TextAnnotation::DetectedLanguage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage").msgclass
|
|
82
|
+
TextAnnotation::DetectedBreak = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak").msgclass
|
|
83
|
+
TextAnnotation::DetectedBreak::BreakType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType").enummodule
|
|
84
|
+
TextAnnotation::TextProperty = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty").msgclass
|
|
85
|
+
Page = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Page").msgclass
|
|
86
|
+
Block = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Block").msgclass
|
|
87
|
+
Block::BlockType = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Block.BlockType").enummodule
|
|
88
|
+
Paragraph = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Paragraph").msgclass
|
|
89
|
+
Word = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Word").msgclass
|
|
90
|
+
Symbol = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.Symbol").msgclass
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# source: google/cloud/vision/v1p3beta1/web_detection.proto
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
require 'google/api/annotations_pb'
|
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
9
|
+
add_message "google.cloud.vision.v1p3beta1.WebDetection" do
|
|
10
|
+
repeated :web_entities, :message, 1, "google.cloud.vision.v1p3beta1.WebDetection.WebEntity"
|
|
11
|
+
repeated :full_matching_images, :message, 2, "google.cloud.vision.v1p3beta1.WebDetection.WebImage"
|
|
12
|
+
repeated :partial_matching_images, :message, 3, "google.cloud.vision.v1p3beta1.WebDetection.WebImage"
|
|
13
|
+
repeated :pages_with_matching_images, :message, 4, "google.cloud.vision.v1p3beta1.WebDetection.WebPage"
|
|
14
|
+
repeated :visually_similar_images, :message, 6, "google.cloud.vision.v1p3beta1.WebDetection.WebImage"
|
|
15
|
+
repeated :best_guess_labels, :message, 8, "google.cloud.vision.v1p3beta1.WebDetection.WebLabel"
|
|
16
|
+
end
|
|
17
|
+
add_message "google.cloud.vision.v1p3beta1.WebDetection.WebEntity" do
|
|
18
|
+
optional :entity_id, :string, 1
|
|
19
|
+
optional :score, :float, 2
|
|
20
|
+
optional :description, :string, 3
|
|
21
|
+
end
|
|
22
|
+
add_message "google.cloud.vision.v1p3beta1.WebDetection.WebImage" do
|
|
23
|
+
optional :url, :string, 1
|
|
24
|
+
optional :score, :float, 2
|
|
25
|
+
end
|
|
26
|
+
add_message "google.cloud.vision.v1p3beta1.WebDetection.WebPage" do
|
|
27
|
+
optional :url, :string, 1
|
|
28
|
+
optional :score, :float, 2
|
|
29
|
+
optional :page_title, :string, 3
|
|
30
|
+
repeated :full_matching_images, :message, 4, "google.cloud.vision.v1p3beta1.WebDetection.WebImage"
|
|
31
|
+
repeated :partial_matching_images, :message, 5, "google.cloud.vision.v1p3beta1.WebDetection.WebImage"
|
|
32
|
+
end
|
|
33
|
+
add_message "google.cloud.vision.v1p3beta1.WebDetection.WebLabel" do
|
|
34
|
+
optional :label, :string, 1
|
|
35
|
+
optional :language_code, :string, 2
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
module Google
|
|
40
|
+
module Cloud
|
|
41
|
+
module Vision
|
|
42
|
+
module V1p3beta1
|
|
43
|
+
WebDetection = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.WebDetection").msgclass
|
|
44
|
+
WebDetection::WebEntity = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.WebDetection.WebEntity").msgclass
|
|
45
|
+
WebDetection::WebImage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.WebDetection.WebImage").msgclass
|
|
46
|
+
WebDetection::WebPage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.WebDetection.WebPage").msgclass
|
|
47
|
+
WebDetection::WebLabel = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vision.v1p3beta1.WebDetection.WebLabel").msgclass
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
metadata
CHANGED
|
@@ -1,30 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-cloud-vision
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.32.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
8
|
-
- Chris Smith
|
|
7
|
+
- Google LLC
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date: 2018-
|
|
11
|
+
date: 2018-11-30 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
|
-
- !ruby/object:Gem::Dependency
|
|
15
|
-
name: google-cloud-core
|
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
|
17
|
-
requirements:
|
|
18
|
-
- - "~>"
|
|
19
|
-
- !ruby/object:Gem::Version
|
|
20
|
-
version: '1.2'
|
|
21
|
-
type: :runtime
|
|
22
|
-
prerelease: false
|
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
24
|
-
requirements:
|
|
25
|
-
- - "~>"
|
|
26
|
-
- !ruby/object:Gem::Version
|
|
27
|
-
version: '1.2'
|
|
28
13
|
- !ruby/object:Gem::Dependency
|
|
29
14
|
name: google-gax
|
|
30
15
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -53,62 +38,6 @@ dependencies:
|
|
|
53
38
|
- - "~>"
|
|
54
39
|
- !ruby/object:Gem::Version
|
|
55
40
|
version: '5.10'
|
|
56
|
-
- !ruby/object:Gem::Dependency
|
|
57
|
-
name: minitest-autotest
|
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
|
59
|
-
requirements:
|
|
60
|
-
- - "~>"
|
|
61
|
-
- !ruby/object:Gem::Version
|
|
62
|
-
version: '1.0'
|
|
63
|
-
type: :development
|
|
64
|
-
prerelease: false
|
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
66
|
-
requirements:
|
|
67
|
-
- - "~>"
|
|
68
|
-
- !ruby/object:Gem::Version
|
|
69
|
-
version: '1.0'
|
|
70
|
-
- !ruby/object:Gem::Dependency
|
|
71
|
-
name: minitest-focus
|
|
72
|
-
requirement: !ruby/object:Gem::Requirement
|
|
73
|
-
requirements:
|
|
74
|
-
- - "~>"
|
|
75
|
-
- !ruby/object:Gem::Version
|
|
76
|
-
version: '1.1'
|
|
77
|
-
type: :development
|
|
78
|
-
prerelease: false
|
|
79
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
80
|
-
requirements:
|
|
81
|
-
- - "~>"
|
|
82
|
-
- !ruby/object:Gem::Version
|
|
83
|
-
version: '1.1'
|
|
84
|
-
- !ruby/object:Gem::Dependency
|
|
85
|
-
name: minitest-rg
|
|
86
|
-
requirement: !ruby/object:Gem::Requirement
|
|
87
|
-
requirements:
|
|
88
|
-
- - "~>"
|
|
89
|
-
- !ruby/object:Gem::Version
|
|
90
|
-
version: '5.2'
|
|
91
|
-
type: :development
|
|
92
|
-
prerelease: false
|
|
93
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
94
|
-
requirements:
|
|
95
|
-
- - "~>"
|
|
96
|
-
- !ruby/object:Gem::Version
|
|
97
|
-
version: '5.2'
|
|
98
|
-
- !ruby/object:Gem::Dependency
|
|
99
|
-
name: autotest-suffix
|
|
100
|
-
requirement: !ruby/object:Gem::Requirement
|
|
101
|
-
requirements:
|
|
102
|
-
- - "~>"
|
|
103
|
-
- !ruby/object:Gem::Version
|
|
104
|
-
version: '1.1'
|
|
105
|
-
type: :development
|
|
106
|
-
prerelease: false
|
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
108
|
-
requirements:
|
|
109
|
-
- - "~>"
|
|
110
|
-
- !ruby/object:Gem::Version
|
|
111
|
-
version: '1.1'
|
|
112
41
|
- !ruby/object:Gem::Dependency
|
|
113
42
|
name: redcarpet
|
|
114
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -129,14 +58,14 @@ dependencies:
|
|
|
129
58
|
requirements:
|
|
130
59
|
- - "~>"
|
|
131
60
|
- !ruby/object:Gem::Version
|
|
132
|
-
version: 0.
|
|
61
|
+
version: 0.59.2
|
|
133
62
|
type: :development
|
|
134
63
|
prerelease: false
|
|
135
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
136
65
|
requirements:
|
|
137
66
|
- - "~>"
|
|
138
67
|
- !ruby/object:Gem::Version
|
|
139
|
-
version: 0.
|
|
68
|
+
version: 0.59.2
|
|
140
69
|
- !ruby/object:Gem::Dependency
|
|
141
70
|
name: simplecov
|
|
142
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -165,81 +94,83 @@ dependencies:
|
|
|
165
94
|
- - "~>"
|
|
166
95
|
- !ruby/object:Gem::Version
|
|
167
96
|
version: '0.9'
|
|
168
|
-
-
|
|
169
|
-
|
|
170
|
-
requirement: !ruby/object:Gem::Requirement
|
|
171
|
-
requirements:
|
|
172
|
-
- - "~>"
|
|
173
|
-
- !ruby/object:Gem::Version
|
|
174
|
-
version: 0.1.13
|
|
175
|
-
type: :development
|
|
176
|
-
prerelease: false
|
|
177
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
178
|
-
requirements:
|
|
179
|
-
- - "~>"
|
|
180
|
-
- !ruby/object:Gem::Version
|
|
181
|
-
version: 0.1.13
|
|
182
|
-
description: google-cloud-vision is the official library for Google Cloud Vision API.
|
|
183
|
-
email:
|
|
184
|
-
- mike@blowmage.com
|
|
185
|
-
- quartzmo@gmail.com
|
|
97
|
+
description: google-cloud-vision is the official library for Cloud Vision API.
|
|
98
|
+
email: googleapis-packages@google.com
|
|
186
99
|
executables: []
|
|
187
100
|
extensions: []
|
|
188
101
|
extra_rdoc_files: []
|
|
189
102
|
files:
|
|
190
103
|
- ".yardopts"
|
|
191
|
-
- AUTHENTICATION.md
|
|
192
|
-
- CHANGELOG.md
|
|
193
|
-
- CODE_OF_CONDUCT.md
|
|
194
|
-
- CONTRIBUTING.md
|
|
195
104
|
- LICENSE
|
|
196
|
-
-
|
|
197
|
-
- OVERVIEW.md
|
|
198
|
-
- TROUBLESHOOTING.md
|
|
199
|
-
- lib/google-cloud-vision.rb
|
|
105
|
+
- README.md
|
|
200
106
|
- lib/google/cloud/vision.rb
|
|
201
|
-
- lib/google/cloud/vision/annotate.rb
|
|
202
|
-
- lib/google/cloud/vision/annotation.rb
|
|
203
|
-
- lib/google/cloud/vision/annotation/crop_hint.rb
|
|
204
|
-
- lib/google/cloud/vision/annotation/entity.rb
|
|
205
|
-
- lib/google/cloud/vision/annotation/face.rb
|
|
206
|
-
- lib/google/cloud/vision/annotation/normalized_vertex.rb
|
|
207
|
-
- lib/google/cloud/vision/annotation/object_localization.rb
|
|
208
|
-
- lib/google/cloud/vision/annotation/properties.rb
|
|
209
|
-
- lib/google/cloud/vision/annotation/safe_search.rb
|
|
210
|
-
- lib/google/cloud/vision/annotation/text.rb
|
|
211
|
-
- lib/google/cloud/vision/annotation/vertex.rb
|
|
212
|
-
- lib/google/cloud/vision/annotation/web.rb
|
|
213
|
-
- lib/google/cloud/vision/credentials.rb
|
|
214
|
-
- lib/google/cloud/vision/image.rb
|
|
215
|
-
- lib/google/cloud/vision/location.rb
|
|
216
|
-
- lib/google/cloud/vision/project.rb
|
|
217
|
-
- lib/google/cloud/vision/service.rb
|
|
218
107
|
- lib/google/cloud/vision/v1.rb
|
|
219
108
|
- lib/google/cloud/vision/v1/credentials.rb
|
|
220
109
|
- lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/geometry.rb
|
|
221
110
|
- lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/image_annotator.rb
|
|
111
|
+
- lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search.rb
|
|
112
|
+
- lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/product_search_service.rb
|
|
222
113
|
- lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/text_annotation.rb
|
|
223
114
|
- lib/google/cloud/vision/v1/doc/google/cloud/vision/v1/web_detection.rb
|
|
224
115
|
- lib/google/cloud/vision/v1/doc/google/longrunning/operations.rb
|
|
225
116
|
- lib/google/cloud/vision/v1/doc/google/protobuf/any.rb
|
|
117
|
+
- lib/google/cloud/vision/v1/doc/google/protobuf/empty.rb
|
|
118
|
+
- lib/google/cloud/vision/v1/doc/google/protobuf/field_mask.rb
|
|
119
|
+
- lib/google/cloud/vision/v1/doc/google/protobuf/timestamp.rb
|
|
226
120
|
- lib/google/cloud/vision/v1/doc/google/protobuf/wrappers.rb
|
|
227
121
|
- lib/google/cloud/vision/v1/doc/google/rpc/status.rb
|
|
228
122
|
- lib/google/cloud/vision/v1/doc/google/type/color.rb
|
|
229
123
|
- lib/google/cloud/vision/v1/doc/google/type/latlng.rb
|
|
230
124
|
- lib/google/cloud/vision/v1/geometry_pb.rb
|
|
125
|
+
- lib/google/cloud/vision/v1/helpers.rb
|
|
231
126
|
- lib/google/cloud/vision/v1/image_annotator_client.rb
|
|
232
127
|
- lib/google/cloud/vision/v1/image_annotator_client_config.json
|
|
233
128
|
- lib/google/cloud/vision/v1/image_annotator_pb.rb
|
|
234
129
|
- lib/google/cloud/vision/v1/image_annotator_services_pb.rb
|
|
130
|
+
- lib/google/cloud/vision/v1/product_search_client.rb
|
|
131
|
+
- lib/google/cloud/vision/v1/product_search_client_config.json
|
|
132
|
+
- lib/google/cloud/vision/v1/product_search_pb.rb
|
|
133
|
+
- lib/google/cloud/vision/v1/product_search_service_pb.rb
|
|
134
|
+
- lib/google/cloud/vision/v1/product_search_service_services_pb.rb
|
|
235
135
|
- lib/google/cloud/vision/v1/text_annotation_pb.rb
|
|
236
136
|
- lib/google/cloud/vision/v1/web_detection_pb.rb
|
|
237
|
-
- lib/google/cloud/vision/
|
|
137
|
+
- lib/google/cloud/vision/v1p3beta1.rb
|
|
138
|
+
- lib/google/cloud/vision/v1p3beta1/credentials.rb
|
|
139
|
+
- lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/geometry.rb
|
|
140
|
+
- lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/image_annotator.rb
|
|
141
|
+
- lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search.rb
|
|
142
|
+
- lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/product_search_service.rb
|
|
143
|
+
- lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/text_annotation.rb
|
|
144
|
+
- lib/google/cloud/vision/v1p3beta1/doc/google/cloud/vision/v1p3beta1/web_detection.rb
|
|
145
|
+
- lib/google/cloud/vision/v1p3beta1/doc/google/longrunning/operations.rb
|
|
146
|
+
- lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/any.rb
|
|
147
|
+
- lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/empty.rb
|
|
148
|
+
- lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/field_mask.rb
|
|
149
|
+
- lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/timestamp.rb
|
|
150
|
+
- lib/google/cloud/vision/v1p3beta1/doc/google/protobuf/wrappers.rb
|
|
151
|
+
- lib/google/cloud/vision/v1p3beta1/doc/google/rpc/status.rb
|
|
152
|
+
- lib/google/cloud/vision/v1p3beta1/doc/google/type/color.rb
|
|
153
|
+
- lib/google/cloud/vision/v1p3beta1/doc/google/type/latlng.rb
|
|
154
|
+
- lib/google/cloud/vision/v1p3beta1/geometry_pb.rb
|
|
155
|
+
- lib/google/cloud/vision/v1p3beta1/helpers.rb
|
|
156
|
+
- lib/google/cloud/vision/v1p3beta1/image_annotator_client.rb
|
|
157
|
+
- lib/google/cloud/vision/v1p3beta1/image_annotator_client_config.json
|
|
158
|
+
- lib/google/cloud/vision/v1p3beta1/image_annotator_pb.rb
|
|
159
|
+
- lib/google/cloud/vision/v1p3beta1/image_annotator_services_pb.rb
|
|
160
|
+
- lib/google/cloud/vision/v1p3beta1/product_search_client.rb
|
|
161
|
+
- lib/google/cloud/vision/v1p3beta1/product_search_client_config.json
|
|
162
|
+
- lib/google/cloud/vision/v1p3beta1/product_search_pb.rb
|
|
163
|
+
- lib/google/cloud/vision/v1p3beta1/product_search_service_pb.rb
|
|
164
|
+
- lib/google/cloud/vision/v1p3beta1/product_search_service_services_pb.rb
|
|
165
|
+
- lib/google/cloud/vision/v1p3beta1/text_annotation_pb.rb
|
|
166
|
+
- lib/google/cloud/vision/v1p3beta1/web_detection_pb.rb
|
|
238
167
|
homepage: https://github.com/googleapis/google-cloud-ruby/tree/master/google-cloud-vision
|
|
239
168
|
licenses:
|
|
240
169
|
- Apache-2.0
|
|
241
170
|
metadata: {}
|
|
242
|
-
post_install_message:
|
|
171
|
+
post_install_message: 'The 0.32.0 release introduced breaking changes relative to
|
|
172
|
+
the previous release, 0.31.0. For more details and instructions to migrate your
|
|
173
|
+
code, please visit the migration guide: https://cloud.google.com/vision/docs/ruby-client-migration.'
|
|
243
174
|
rdoc_options: []
|
|
244
175
|
require_paths:
|
|
245
176
|
- lib
|
|
@@ -258,5 +189,5 @@ rubyforge_project:
|
|
|
258
189
|
rubygems_version: 2.7.7
|
|
259
190
|
signing_key:
|
|
260
191
|
specification_version: 4
|
|
261
|
-
summary: API Client library for
|
|
192
|
+
summary: API Client library for Cloud Vision API
|
|
262
193
|
test_files: []
|
data/AUTHENTICATION.md
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
# Authentication
|
|
2
|
-
|
|
3
|
-
In general, the google-cloud-vision library uses [Service
|
|
4
|
-
Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
|
|
5
|
-
credentials to connect to Google Cloud services. When running on Compute Engine
|
|
6
|
-
the credentials will be discovered automatically. When running on other
|
|
7
|
-
environments, the Service Account credentials can be specified by providing the
|
|
8
|
-
path to the [JSON
|
|
9
|
-
keyfile](https://cloud.google.com/iam/docs/managing-service-account-keys) for
|
|
10
|
-
the account (or the JSON itself) in environment variables. Additionally, Cloud
|
|
11
|
-
SDK credentials can also be discovered automatically, but this is only
|
|
12
|
-
recommended during development.
|
|
13
|
-
|
|
14
|
-
## Project and Credential Lookup
|
|
15
|
-
|
|
16
|
-
The google-cloud-vision library aims to make authentication as simple as
|
|
17
|
-
possible, and provides several mechanisms to configure your system without
|
|
18
|
-
providing **Project ID** and **Service Account Credentials** directly in code.
|
|
19
|
-
|
|
20
|
-
**Project ID** is discovered in the following order:
|
|
21
|
-
|
|
22
|
-
1. Specify project ID in method arguments
|
|
23
|
-
2. Specify project ID in configuration
|
|
24
|
-
3. Discover project ID in environment variables
|
|
25
|
-
4. Discover GCE project ID
|
|
26
|
-
|
|
27
|
-
**Credentials** are discovered in the following order:
|
|
28
|
-
|
|
29
|
-
1. Specify credentials in method arguments
|
|
30
|
-
2. Specify credentials in configuration
|
|
31
|
-
3. Discover credentials path in environment variables
|
|
32
|
-
4. Discover credentials JSON in environment variables
|
|
33
|
-
5. Discover credentials file in the Cloud SDK's path
|
|
34
|
-
6. Discover GCE credentials
|
|
35
|
-
|
|
36
|
-
### Google Cloud Platform environments
|
|
37
|
-
|
|
38
|
-
While running on Google Cloud Platform environments such as Google Compute
|
|
39
|
-
Engine, Google App Engine and Google Kubernetes Engine, no extra work is needed.
|
|
40
|
-
The **Project ID** and **Credentials** and are discovered automatically. Code
|
|
41
|
-
should be written as if already authenticated. Just be sure when you [set up the
|
|
42
|
-
GCE instance][gce-how-to], you add the correct scopes for the APIs you want to
|
|
43
|
-
access. For example:
|
|
44
|
-
|
|
45
|
-
* **All APIs**
|
|
46
|
-
* `https://www.googleapis.com/auth/cloud-platform`
|
|
47
|
-
* `https://www.googleapis.com/auth/cloud-platform.read-only`
|
|
48
|
-
* **BigQuery**
|
|
49
|
-
* `https://www.googleapis.com/auth/bigquery`
|
|
50
|
-
* `https://www.googleapis.com/auth/bigquery.insertdata`
|
|
51
|
-
* **Compute Engine**
|
|
52
|
-
* `https://www.googleapis.com/auth/compute`
|
|
53
|
-
* **Datastore**
|
|
54
|
-
* `https://www.googleapis.com/auth/datastore`
|
|
55
|
-
* `https://www.googleapis.com/auth/userinfo.email`
|
|
56
|
-
* **DNS**
|
|
57
|
-
* `https://www.googleapis.com/auth/ndev.clouddns.readwrite`
|
|
58
|
-
* **Pub/Sub**
|
|
59
|
-
* `https://www.googleapis.com/auth/pubsub`
|
|
60
|
-
* **Storage**
|
|
61
|
-
* `https://www.googleapis.com/auth/devstorage.full_control`
|
|
62
|
-
* `https://www.googleapis.com/auth/devstorage.read_only`
|
|
63
|
-
* `https://www.googleapis.com/auth/devstorage.read_write`
|
|
64
|
-
|
|
65
|
-
### Environment Variables
|
|
66
|
-
|
|
67
|
-
The **Project ID** and **Credentials JSON** can be placed in environment
|
|
68
|
-
variables instead of declaring them directly in code. Each service has its own
|
|
69
|
-
environment variable, allowing for different service accounts to be used for
|
|
70
|
-
different services. (See the READMEs for the individual service gems for
|
|
71
|
-
details.) The path to the **Credentials JSON** file can be stored in the
|
|
72
|
-
environment variable, or the **Credentials JSON** itself can be stored for
|
|
73
|
-
environments such as Docker containers where writing files is difficult or not
|
|
74
|
-
encouraged.
|
|
75
|
-
|
|
76
|
-
The environment variables that Vision checks for project ID are:
|
|
77
|
-
|
|
78
|
-
1. `VISION_PROJECT`
|
|
79
|
-
2. `GOOGLE_CLOUD_PROJECT`
|
|
80
|
-
|
|
81
|
-
The environment variables that Vision checks for credentials are configured on
|
|
82
|
-
{Google::Cloud::Vision::V1::Credentials}:
|
|
83
|
-
|
|
84
|
-
1. `VISION_CREDENTIALS` - Path to JSON file, or JSON contents
|
|
85
|
-
2. `VISION_KEYFILE` - Path to JSON file, or JSON contents
|
|
86
|
-
3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
|
87
|
-
4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
|
88
|
-
5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
|
89
|
-
|
|
90
|
-
```ruby
|
|
91
|
-
require "google/cloud/vision"
|
|
92
|
-
|
|
93
|
-
ENV["VISION_PROJECT"] = "my-project-id"
|
|
94
|
-
ENV["VISION_CREDENTIALS"] = "path/to/keyfile.json"
|
|
95
|
-
|
|
96
|
-
vision = Google::Cloud::Vision.new
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### Configuration
|
|
100
|
-
|
|
101
|
-
The **Project ID** and **Credentials JSON** can be configured instead of placing them in environment variables or providing them as arguments.
|
|
102
|
-
|
|
103
|
-
```ruby
|
|
104
|
-
require "google/cloud/vision"
|
|
105
|
-
|
|
106
|
-
Google::Cloud::Vision.configure do |config|
|
|
107
|
-
config.project_id = "my-project-id"
|
|
108
|
-
config.credentials = "path/to/keyfile.json"
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
vision = Google::Cloud::Vision.new
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### Cloud SDK
|
|
115
|
-
|
|
116
|
-
This option allows for an easy way to authenticate during development. If
|
|
117
|
-
credentials are not provided in code or in environment variables, then Cloud SDK
|
|
118
|
-
credentials are discovered.
|
|
119
|
-
|
|
120
|
-
To configure your system for this, simply:
|
|
121
|
-
|
|
122
|
-
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
|
123
|
-
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
|
124
|
-
3. Write code as if already authenticated.
|
|
125
|
-
|
|
126
|
-
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
|
127
|
-
*should* only be used during development.
|
|
128
|
-
|
|
129
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
|
130
|
-
[dev-console]: https://console.cloud.google.com/project
|
|
131
|
-
|
|
132
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
|
133
|
-
|
|
134
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
|
135
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
|
136
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
|
137
|
-
|
|
138
|
-
## Creating a Service Account
|
|
139
|
-
|
|
140
|
-
Google Cloud requires a **Project ID** and **Service Account Credentials** to
|
|
141
|
-
connect to the APIs. You will use the **Project ID** and **JSON key file** to
|
|
142
|
-
connect to most services with google-cloud-vision.
|
|
143
|
-
|
|
144
|
-
If you are not running this client on Google Compute Engine, you need a Google
|
|
145
|
-
Developers service account.
|
|
146
|
-
|
|
147
|
-
1. Visit the [Google Developers Console][dev-console].
|
|
148
|
-
1. Create a new project or click on an existing project.
|
|
149
|
-
1. Activate the slide-out navigation tray and select **API Manager**. From
|
|
150
|
-
here, you will enable the APIs that your application requires.
|
|
151
|
-
|
|
152
|
-
![Enable the APIs that your application requires][enable-apis]
|
|
153
|
-
|
|
154
|
-
*Note: You may need to enable billing in order to use these services.*
|
|
155
|
-
|
|
156
|
-
1. Select **Credentials** from the side navigation.
|
|
157
|
-
|
|
158
|
-
You should see a screen like one of the following.
|
|
159
|
-
|
|
160
|
-
![Create a new service account][create-new-service-account]
|
|
161
|
-
|
|
162
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
|
163
|
-
|
|
164
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
|
165
|
-
guided through downloading a new JSON key file.
|
|
166
|
-
|
|
167
|
-
If you want to re-use an existing service account, you can easily generate a
|
|
168
|
-
new key file. Just select the account you wish to re-use, and click "Generate
|
|
169
|
-
new JSON key":
|
|
170
|
-
|
|
171
|
-
![Re-use an existing service account][reuse-service-account]
|
|
172
|
-
|
|
173
|
-
The key file you download will be used by this library to authenticate API
|
|
174
|
-
requests and should be stored in a secure location.
|
|
175
|
-
|
|
176
|
-
## Troubleshooting
|
|
177
|
-
|
|
178
|
-
If you're having trouble authenticating you can ask for help by following the
|
|
179
|
-
{file:TROUBLESHOOTING.md Troubleshooting Guide}.
|