brand.dev 0.0.2 → 0.1.0.pre.alpha.1
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/CHANGELOG.md +0 -173
- data/README.md +1 -1
- data/lib/brand_dev/errors.rb +0 -22
- data/lib/brand_dev/internal/transport/base_client.rb +2 -10
- data/lib/brand_dev/internal/type/array_of.rb +1 -6
- data/lib/brand_dev/internal/type/base_model.rb +25 -77
- data/lib/brand_dev/internal/type/boolean.rb +1 -7
- data/lib/brand_dev/internal/type/converter.rb +34 -42
- data/lib/brand_dev/internal/type/enum.rb +5 -16
- data/lib/brand_dev/internal/type/file_input.rb +1 -6
- data/lib/brand_dev/internal/type/hash_of.rb +1 -6
- data/lib/brand_dev/internal/type/union.rb +9 -17
- data/lib/brand_dev/internal/type/unknown.rb +1 -7
- data/lib/brand_dev/internal/util.rb +9 -8
- data/lib/brand_dev/models/brand_ai_query_params.rb +5 -87
- data/lib/brand_dev/models/brand_identify_from_transaction_params.rb +1 -14
- data/lib/brand_dev/models/brand_identify_from_transaction_response.rb +29 -1
- data/lib/brand_dev/models/brand_retrieve_by_ticker_params.rb +1 -14
- data/lib/brand_dev/models/brand_retrieve_by_ticker_response.rb +29 -1
- data/lib/brand_dev/models/brand_retrieve_naics_params.rb +1 -11
- data/lib/brand_dev/models/brand_retrieve_params.rb +1 -24
- data/lib/brand_dev/models/brand_retrieve_response.rb +29 -1
- data/lib/brand_dev/models/brand_search_params.rb +22 -0
- data/lib/brand_dev/models/brand_search_response.rb +35 -0
- data/lib/brand_dev/models.rb +5 -11
- data/lib/brand_dev/resources/brand.rb +20 -139
- data/lib/brand_dev/version.rb +1 -1
- data/lib/brand_dev.rb +2 -8
- data/rbi/brand_dev/errors.rbi +0 -16
- data/rbi/brand_dev/internal/type/boolean.rbi +0 -2
- data/rbi/brand_dev/internal/type/converter.rbi +15 -15
- data/rbi/brand_dev/internal/type/union.rbi +0 -5
- data/rbi/brand_dev/internal/type/unknown.rbi +0 -2
- data/rbi/brand_dev/internal/util.rbi +0 -2
- data/rbi/brand_dev/models/brand_ai_query_params.rbi +6 -141
- data/rbi/brand_dev/models/brand_identify_from_transaction_params.rbi +0 -15
- data/rbi/brand_dev/models/brand_identify_from_transaction_response.rbi +69 -0
- data/rbi/brand_dev/models/brand_retrieve_by_ticker_params.rbi +1 -19
- data/rbi/brand_dev/models/brand_retrieve_by_ticker_response.rbi +69 -0
- data/rbi/brand_dev/models/brand_retrieve_naics_params.rbi +1 -19
- data/rbi/brand_dev/models/brand_retrieve_params.rbi +0 -30
- data/rbi/brand_dev/models/brand_retrieve_response.rbi +65 -0
- data/rbi/brand_dev/models/brand_search_params.rbi +40 -0
- data/rbi/brand_dev/models/brand_search_response.rbi +63 -0
- data/rbi/brand_dev/models.rbi +1 -8
- data/rbi/brand_dev/resources/brand.rbi +8 -112
- data/sig/brand_dev/errors.rbs +0 -9
- data/sig/brand_dev/internal/type/converter.rbs +1 -7
- data/sig/brand_dev/models/brand_ai_query_params.rbs +5 -82
- data/sig/brand_dev/models/brand_identify_from_transaction_params.rbs +1 -7
- data/sig/brand_dev/models/brand_identify_from_transaction_response.rbs +25 -0
- data/sig/brand_dev/models/brand_retrieve_by_ticker_params.rbs +1 -8
- data/sig/brand_dev/models/brand_retrieve_by_ticker_response.rbs +25 -0
- data/sig/brand_dev/models/brand_retrieve_naics_params.rbs +1 -8
- data/sig/brand_dev/models/brand_retrieve_params.rbs +1 -15
- data/sig/brand_dev/models/brand_retrieve_response.rbs +25 -0
- data/sig/brand_dev/models/brand_search_params.rbs +23 -0
- data/sig/brand_dev/models/brand_search_response.rbs +29 -0
- data/sig/brand_dev/models.rbs +1 -7
- data/sig/brand_dev/resources/brand.rbs +4 -29
- metadata +10 -28
- data/lib/brand_dev/models/brand_prefetch_params.rb +0 -35
- data/lib/brand_dev/models/brand_prefetch_response.rb +0 -33
- data/lib/brand_dev/models/brand_retrieve_simplified_params.rb +0 -35
- data/lib/brand_dev/models/brand_retrieve_simplified_response.rb +0 -280
- data/lib/brand_dev/models/brand_screenshot_params.rb +0 -49
- data/lib/brand_dev/models/brand_screenshot_response.rb +0 -64
- data/lib/brand_dev/models/brand_styleguide_params.rb +0 -36
- data/lib/brand_dev/models/brand_styleguide_response.rb +0 -769
- data/rbi/brand_dev/models/brand_prefetch_params.rbi +0 -58
- data/rbi/brand_dev/models/brand_prefetch_response.rbi +0 -57
- data/rbi/brand_dev/models/brand_retrieve_simplified_params.rbi +0 -61
- data/rbi/brand_dev/models/brand_retrieve_simplified_response.rbi +0 -667
- data/rbi/brand_dev/models/brand_screenshot_params.rbi +0 -105
- data/rbi/brand_dev/models/brand_screenshot_response.rbi +0 -135
- data/rbi/brand_dev/models/brand_styleguide_params.rbi +0 -60
- data/rbi/brand_dev/models/brand_styleguide_response.rbi +0 -1648
- data/sig/brand_dev/models/brand_prefetch_params.rbs +0 -30
- data/sig/brand_dev/models/brand_prefetch_response.rbs +0 -28
- data/sig/brand_dev/models/brand_retrieve_simplified_params.rbs +0 -30
- data/sig/brand_dev/models/brand_retrieve_simplified_response.rbs +0 -292
- data/sig/brand_dev/models/brand_screenshot_params.rbs +0 -46
- data/sig/brand_dev/models/brand_screenshot_response.rbs +0 -63
- data/sig/brand_dev/models/brand_styleguide_params.rbs +0 -30
- data/sig/brand_dev/models/brand_styleguide_response.rbs +0 -925
@@ -56,14 +56,10 @@ module BrandDev
|
|
56
56
|
#
|
57
57
|
# @param state [Hash{Symbol=>Object}] .
|
58
58
|
#
|
59
|
-
# @option state [Boolean] :
|
60
|
-
#
|
61
|
-
# @option state [Boolean] :strictness
|
59
|
+
# @option state [Boolean, :strong] :strictness
|
62
60
|
#
|
63
61
|
# @option state [Hash{Symbol=>Object}] :exactness
|
64
62
|
#
|
65
|
-
# @option state [Class<StandardError>] :error
|
66
|
-
#
|
67
63
|
# @option state [Integer] :branched
|
68
64
|
#
|
69
65
|
# @return [Symbol, Object]
|
@@ -74,12 +70,8 @@ module BrandDev
|
|
74
70
|
if values.include?(val)
|
75
71
|
exactness[:yes] += 1
|
76
72
|
val
|
77
|
-
elsif values.first&.class == val.class
|
78
|
-
exactness[:maybe] += 1
|
79
|
-
value
|
80
73
|
else
|
81
|
-
exactness[:no] += 1
|
82
|
-
state[:error] = TypeError.new("#{value.class} can't be coerced into #{self}")
|
74
|
+
exactness[values.first&.class == val.class ? :maybe : :no] += 1
|
83
75
|
value
|
84
76
|
end
|
85
77
|
end
|
@@ -99,14 +91,11 @@ module BrandDev
|
|
99
91
|
#
|
100
92
|
# @return [Object]
|
101
93
|
def to_sorbet_type
|
102
|
-
|
103
|
-
case types
|
94
|
+
case values
|
104
95
|
in []
|
105
96
|
T.noreturn
|
106
|
-
in [
|
107
|
-
|
108
|
-
else
|
109
|
-
T.any(*types)
|
97
|
+
in [value, *_]
|
98
|
+
T.all(BrandDev::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(value), self)
|
110
99
|
end
|
111
100
|
end
|
112
101
|
|
@@ -45,14 +45,10 @@ module BrandDev
|
|
45
45
|
#
|
46
46
|
# @param state [Hash{Symbol=>Object}] .
|
47
47
|
#
|
48
|
-
# @option state [Boolean] :
|
49
|
-
#
|
50
|
-
# @option state [Boolean] :strictness
|
48
|
+
# @option state [Boolean, :strong] :strictness
|
51
49
|
#
|
52
50
|
# @option state [Hash{Symbol=>Object}] :exactness
|
53
51
|
#
|
54
|
-
# @option state [Class<StandardError>] :error
|
55
|
-
#
|
56
52
|
# @option state [Integer] :branched
|
57
53
|
#
|
58
54
|
# @return [StringIO, Object]
|
@@ -66,7 +62,6 @@ module BrandDev
|
|
66
62
|
exactness[:yes] += 1
|
67
63
|
value
|
68
64
|
else
|
69
|
-
state[:error] = TypeError.new("#{value.class} can't be coerced into #{StringIO}")
|
70
65
|
exactness[:no] += 1
|
71
66
|
value
|
72
67
|
end
|
@@ -77,14 +77,10 @@ module BrandDev
|
|
77
77
|
#
|
78
78
|
# @param state [Hash{Symbol=>Object}] .
|
79
79
|
#
|
80
|
-
# @option state [Boolean] :
|
81
|
-
#
|
82
|
-
# @option state [Boolean] :strictness
|
80
|
+
# @option state [Boolean, :strong] :strictness
|
83
81
|
#
|
84
82
|
# @option state [Hash{Symbol=>Object}] :exactness
|
85
83
|
#
|
86
|
-
# @option state [Class<StandardError>] :error
|
87
|
-
#
|
88
84
|
# @option state [Integer] :branched
|
89
85
|
#
|
90
86
|
# @return [Hash{Symbol=>Object}, Object]
|
@@ -93,7 +89,6 @@ module BrandDev
|
|
93
89
|
|
94
90
|
unless value.is_a?(Hash)
|
95
91
|
exactness[:no] += 1
|
96
|
-
state[:error] = TypeError.new("#{value.class} can't be coerced into #{Hash}")
|
97
92
|
return value
|
98
93
|
end
|
99
94
|
|
@@ -115,23 +115,14 @@ module BrandDev
|
|
115
115
|
|
116
116
|
# @api private
|
117
117
|
#
|
118
|
-
# Tries to efficiently coerce the given value to one of the known variants.
|
119
|
-
#
|
120
|
-
# If the value cannot match any of the known variants, the coercion is considered
|
121
|
-
# non-viable and returns the original value.
|
122
|
-
#
|
123
118
|
# @param value [Object]
|
124
119
|
#
|
125
120
|
# @param state [Hash{Symbol=>Object}] .
|
126
121
|
#
|
127
|
-
# @option state [Boolean] :
|
128
|
-
#
|
129
|
-
# @option state [Boolean] :strictness
|
122
|
+
# @option state [Boolean, :strong] :strictness
|
130
123
|
#
|
131
124
|
# @option state [Hash{Symbol=>Object}] :exactness
|
132
125
|
#
|
133
|
-
# @option state [Class<StandardError>] :error
|
134
|
-
#
|
135
126
|
# @option state [Integer] :branched
|
136
127
|
#
|
137
128
|
# @return [Object]
|
@@ -142,6 +133,7 @@ module BrandDev
|
|
142
133
|
|
143
134
|
strictness = state.fetch(:strictness)
|
144
135
|
exactness = state.fetch(:exactness)
|
136
|
+
state[:strictness] = strictness == :strong ? true : strictness
|
145
137
|
|
146
138
|
alternatives = []
|
147
139
|
known_variants.each do |_, variant_fn|
|
@@ -160,10 +152,13 @@ module BrandDev
|
|
160
152
|
end
|
161
153
|
end
|
162
154
|
|
163
|
-
case alternatives.sort_by
|
155
|
+
case alternatives.sort_by(&:first)
|
164
156
|
in []
|
165
157
|
exactness[:no] += 1
|
166
|
-
|
158
|
+
if strictness == :strong
|
159
|
+
message = "no possible conversion of #{value.class} into a variant of #{target.inspect}"
|
160
|
+
raise ArgumentError.new(message)
|
161
|
+
end
|
167
162
|
value
|
168
163
|
in [[_, exact, coerced], *]
|
169
164
|
exact.each { exactness[_1] += _2 }
|
@@ -200,14 +195,11 @@ module BrandDev
|
|
200
195
|
#
|
201
196
|
# @return [Object]
|
202
197
|
def to_sorbet_type
|
203
|
-
|
204
|
-
case types
|
198
|
+
case (v = variants)
|
205
199
|
in []
|
206
200
|
T.noreturn
|
207
|
-
in [type]
|
208
|
-
type
|
209
201
|
else
|
210
|
-
T.any(*
|
202
|
+
T.any(*v.map { BrandDev::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) })
|
211
203
|
end
|
212
204
|
end
|
213
205
|
|
@@ -33,20 +33,14 @@ module BrandDev
|
|
33
33
|
class << self
|
34
34
|
# @api private
|
35
35
|
#
|
36
|
-
# No coercion needed for Unknown type.
|
37
|
-
#
|
38
36
|
# @param value [Object]
|
39
37
|
#
|
40
38
|
# @param state [Hash{Symbol=>Object}] .
|
41
39
|
#
|
42
|
-
# @option state [Boolean] :
|
43
|
-
#
|
44
|
-
# @option state [Boolean] :strictness
|
40
|
+
# @option state [Boolean, :strong] :strictness
|
45
41
|
#
|
46
42
|
# @option state [Hash{Symbol=>Object}] :exactness
|
47
43
|
#
|
48
|
-
# @option state [Class<StandardError>] :error
|
49
|
-
#
|
50
44
|
# @option state [Integer] :branched
|
51
45
|
#
|
52
46
|
# @return [Object]
|
@@ -497,7 +497,7 @@ module BrandDev
|
|
497
497
|
# @param closing [Array<Proc>]
|
498
498
|
# @param content_type [String, nil]
|
499
499
|
private def write_multipart_content(y, val:, closing:, content_type: nil)
|
500
|
-
|
500
|
+
content_type ||= "application/octet-stream"
|
501
501
|
|
502
502
|
case val
|
503
503
|
in BrandDev::FilePart
|
@@ -508,21 +508,24 @@ module BrandDev
|
|
508
508
|
content_type: val.content_type
|
509
509
|
)
|
510
510
|
in Pathname
|
511
|
-
y <<
|
511
|
+
y << "Content-Type: #{content_type}\r\n\r\n"
|
512
512
|
io = val.open(binmode: true)
|
513
513
|
closing << io.method(:close)
|
514
514
|
IO.copy_stream(io, y)
|
515
515
|
in IO
|
516
|
-
y <<
|
516
|
+
y << "Content-Type: #{content_type}\r\n\r\n"
|
517
517
|
IO.copy_stream(val, y)
|
518
518
|
in StringIO
|
519
|
-
y <<
|
519
|
+
y << "Content-Type: #{content_type}\r\n\r\n"
|
520
520
|
y << val.string
|
521
|
+
in String
|
522
|
+
y << "Content-Type: #{content_type}\r\n\r\n"
|
523
|
+
y << val.to_s
|
521
524
|
in -> { primitive?(_1) }
|
522
|
-
y <<
|
525
|
+
y << "Content-Type: text/plain\r\n\r\n"
|
523
526
|
y << val.to_s
|
524
527
|
else
|
525
|
-
y <<
|
528
|
+
y << "Content-Type: application/json\r\n\r\n"
|
526
529
|
y << JSON.generate(val)
|
527
530
|
end
|
528
531
|
y << "\r\n"
|
@@ -560,8 +563,6 @@ module BrandDev
|
|
560
563
|
|
561
564
|
# @api private
|
562
565
|
#
|
563
|
-
# https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#special-considerations-for-multipart-content
|
564
|
-
#
|
565
566
|
# @param body [Object]
|
566
567
|
#
|
567
568
|
# @return [Array(String, Enumerable<String>)]
|
@@ -21,30 +21,17 @@ module BrandDev
|
|
21
21
|
required :domain, String
|
22
22
|
|
23
23
|
# @!attribute specific_pages
|
24
|
-
# Optional
|
24
|
+
# Optional array of specific pages to analyze
|
25
25
|
#
|
26
|
-
# @return [
|
27
|
-
optional :specific_pages,
|
26
|
+
# @return [Array<String>, nil]
|
27
|
+
optional :specific_pages, BrandDev::Internal::Type::ArrayOf[String]
|
28
28
|
|
29
|
-
# @!
|
30
|
-
# Optional timeout in milliseconds for the request. If the request takes longer
|
31
|
-
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
32
|
-
# value is 300000ms (5 minutes).
|
33
|
-
#
|
34
|
-
# @return [Integer, nil]
|
35
|
-
optional :timeout_ms, Integer, api_name: :timeoutMS
|
36
|
-
|
37
|
-
# @!method initialize(data_to_extract:, domain:, specific_pages: nil, timeout_ms: nil, request_options: {})
|
38
|
-
# Some parameter documentations has been truncated, see
|
39
|
-
# {BrandDev::Models::BrandAIQueryParams} for more details.
|
40
|
-
#
|
29
|
+
# @!method initialize(data_to_extract:, domain:, specific_pages: nil, request_options: {})
|
41
30
|
# @param data_to_extract [Array<BrandDev::Models::BrandAIQueryParams::DataToExtract>] Array of data points to extract from the website
|
42
31
|
#
|
43
32
|
# @param domain [String] The domain name to analyze
|
44
33
|
#
|
45
|
-
# @param specific_pages [
|
46
|
-
#
|
47
|
-
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
34
|
+
# @param specific_pages [Array<String>] Optional array of specific pages to analyze
|
48
35
|
#
|
49
36
|
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
|
50
37
|
|
@@ -99,75 +86,6 @@ module BrandDev
|
|
99
86
|
# @return [Array<Symbol>]
|
100
87
|
end
|
101
88
|
end
|
102
|
-
|
103
|
-
class SpecificPages < BrandDev::Internal::Type::BaseModel
|
104
|
-
# @!attribute about_us
|
105
|
-
# Whether to analyze the about us page
|
106
|
-
#
|
107
|
-
# @return [Boolean, nil]
|
108
|
-
optional :about_us, BrandDev::Internal::Type::Boolean
|
109
|
-
|
110
|
-
# @!attribute blog
|
111
|
-
# Whether to analyze the blog
|
112
|
-
#
|
113
|
-
# @return [Boolean, nil]
|
114
|
-
optional :blog, BrandDev::Internal::Type::Boolean
|
115
|
-
|
116
|
-
# @!attribute careers
|
117
|
-
# Whether to analyze the careers page
|
118
|
-
#
|
119
|
-
# @return [Boolean, nil]
|
120
|
-
optional :careers, BrandDev::Internal::Type::Boolean
|
121
|
-
|
122
|
-
# @!attribute contact_us
|
123
|
-
# Whether to analyze the contact us page
|
124
|
-
#
|
125
|
-
# @return [Boolean, nil]
|
126
|
-
optional :contact_us, BrandDev::Internal::Type::Boolean
|
127
|
-
|
128
|
-
# @!attribute faq
|
129
|
-
# Whether to analyze the FAQ page
|
130
|
-
#
|
131
|
-
# @return [Boolean, nil]
|
132
|
-
optional :faq, BrandDev::Internal::Type::Boolean
|
133
|
-
|
134
|
-
# @!attribute home_page
|
135
|
-
# Whether to analyze the home page
|
136
|
-
#
|
137
|
-
# @return [Boolean, nil]
|
138
|
-
optional :home_page, BrandDev::Internal::Type::Boolean
|
139
|
-
|
140
|
-
# @!attribute privacy_policy
|
141
|
-
# Whether to analyze the privacy policy page
|
142
|
-
#
|
143
|
-
# @return [Boolean, nil]
|
144
|
-
optional :privacy_policy, BrandDev::Internal::Type::Boolean
|
145
|
-
|
146
|
-
# @!attribute terms_and_conditions
|
147
|
-
# Whether to analyze the terms and conditions page
|
148
|
-
#
|
149
|
-
# @return [Boolean, nil]
|
150
|
-
optional :terms_and_conditions, BrandDev::Internal::Type::Boolean
|
151
|
-
|
152
|
-
# @!method initialize(about_us: nil, blog: nil, careers: nil, contact_us: nil, faq: nil, home_page: nil, privacy_policy: nil, terms_and_conditions: nil)
|
153
|
-
# Optional object specifying which pages to analyze
|
154
|
-
#
|
155
|
-
# @param about_us [Boolean] Whether to analyze the about us page
|
156
|
-
#
|
157
|
-
# @param blog [Boolean] Whether to analyze the blog
|
158
|
-
#
|
159
|
-
# @param careers [Boolean] Whether to analyze the careers page
|
160
|
-
#
|
161
|
-
# @param contact_us [Boolean] Whether to analyze the contact us page
|
162
|
-
#
|
163
|
-
# @param faq [Boolean] Whether to analyze the FAQ page
|
164
|
-
#
|
165
|
-
# @param home_page [Boolean] Whether to analyze the home page
|
166
|
-
#
|
167
|
-
# @param privacy_policy [Boolean] Whether to analyze the privacy policy page
|
168
|
-
#
|
169
|
-
# @param terms_and_conditions [Boolean] Whether to analyze the terms and conditions page
|
170
|
-
end
|
171
89
|
end
|
172
90
|
end
|
173
91
|
end
|
@@ -13,22 +13,9 @@ module BrandDev
|
|
13
13
|
# @return [String]
|
14
14
|
required :transaction_info, String
|
15
15
|
|
16
|
-
# @!
|
17
|
-
# Optional timeout in milliseconds for the request. If the request takes longer
|
18
|
-
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
19
|
-
# value is 300000ms (5 minutes).
|
20
|
-
#
|
21
|
-
# @return [Integer, nil]
|
22
|
-
optional :timeout_ms, Integer
|
23
|
-
|
24
|
-
# @!method initialize(transaction_info:, timeout_ms: nil, request_options: {})
|
25
|
-
# Some parameter documentations has been truncated, see
|
26
|
-
# {BrandDev::Models::BrandIdentifyFromTransactionParams} for more details.
|
27
|
-
#
|
16
|
+
# @!method initialize(transaction_info:, request_options: {})
|
28
17
|
# @param transaction_info [String] Transaction information to identify the brand
|
29
18
|
#
|
30
|
-
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
31
|
-
#
|
32
19
|
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
|
33
20
|
end
|
34
21
|
end
|
@@ -63,6 +63,13 @@ module BrandDev
|
|
63
63
|
# @return [String, nil]
|
64
64
|
optional :domain, String
|
65
65
|
|
66
|
+
# @!attribute fonts
|
67
|
+
# An array of fonts used by the brand's website
|
68
|
+
#
|
69
|
+
# @return [Array<BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Font>, nil]
|
70
|
+
optional :fonts,
|
71
|
+
-> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Font] }
|
72
|
+
|
66
73
|
# @!attribute logos
|
67
74
|
# An array of logos associated with the brand
|
68
75
|
#
|
@@ -96,7 +103,7 @@ module BrandDev
|
|
96
103
|
# @return [String, nil]
|
97
104
|
optional :title, String
|
98
105
|
|
99
|
-
# @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, logos: nil, slogan: nil, socials: nil, stock: nil, title: nil)
|
106
|
+
# @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, fonts: nil, logos: nil, slogan: nil, socials: nil, stock: nil, title: nil)
|
100
107
|
# Some parameter documentations has been truncated, see
|
101
108
|
# {BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand} for more
|
102
109
|
# details.
|
@@ -113,6 +120,8 @@ module BrandDev
|
|
113
120
|
#
|
114
121
|
# @param domain [String] The domain name of the brand
|
115
122
|
#
|
123
|
+
# @param fonts [Array<BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Font>] An array of fonts used by the brand's website
|
124
|
+
#
|
116
125
|
# @param logos [Array<BrandDev::Models::BrandIdentifyFromTransactionResponse::Brand::Logo>] An array of logos associated with the brand
|
117
126
|
#
|
118
127
|
# @param slogan [String] The brand's slogan
|
@@ -274,6 +283,25 @@ module BrandDev
|
|
274
283
|
# @param name [String] Name of the color
|
275
284
|
end
|
276
285
|
|
286
|
+
class Font < BrandDev::Internal::Type::BaseModel
|
287
|
+
# @!attribute name
|
288
|
+
# Name of the font
|
289
|
+
#
|
290
|
+
# @return [String, nil]
|
291
|
+
optional :name, String
|
292
|
+
|
293
|
+
# @!attribute usage
|
294
|
+
# Usage of the font, e.g., 'title', 'body', 'button'
|
295
|
+
#
|
296
|
+
# @return [String, nil]
|
297
|
+
optional :usage, String
|
298
|
+
|
299
|
+
# @!method initialize(name: nil, usage: nil)
|
300
|
+
# @param name [String] Name of the font
|
301
|
+
#
|
302
|
+
# @param usage [String] Usage of the font, e.g., 'title', 'body', 'button'
|
303
|
+
end
|
304
|
+
|
277
305
|
class Logo < BrandDev::Internal::Type::BaseModel
|
278
306
|
# @!attribute colors
|
279
307
|
# Array of colors in the logo
|
@@ -13,22 +13,9 @@ module BrandDev
|
|
13
13
|
# @return [String]
|
14
14
|
required :ticker, String
|
15
15
|
|
16
|
-
# @!
|
17
|
-
# Optional timeout in milliseconds for the request. If the request takes longer
|
18
|
-
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
19
|
-
# value is 300000ms (5 minutes).
|
20
|
-
#
|
21
|
-
# @return [Integer, nil]
|
22
|
-
optional :timeout_ms, Integer
|
23
|
-
|
24
|
-
# @!method initialize(ticker:, timeout_ms: nil, request_options: {})
|
25
|
-
# Some parameter documentations has been truncated, see
|
26
|
-
# {BrandDev::Models::BrandRetrieveByTickerParams} for more details.
|
27
|
-
#
|
16
|
+
# @!method initialize(ticker:, request_options: {})
|
28
17
|
# @param ticker [String] Stock ticker symbol to retrieve brand data for (e.g. AAPL, TSLA, etc.)
|
29
18
|
#
|
30
|
-
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
31
|
-
#
|
32
19
|
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
|
33
20
|
end
|
34
21
|
end
|
@@ -63,6 +63,13 @@ module BrandDev
|
|
63
63
|
# @return [String, nil]
|
64
64
|
optional :domain, String
|
65
65
|
|
66
|
+
# @!attribute fonts
|
67
|
+
# An array of fonts used by the brand's website
|
68
|
+
#
|
69
|
+
# @return [Array<BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Font>, nil]
|
70
|
+
optional :fonts,
|
71
|
+
-> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Font] }
|
72
|
+
|
66
73
|
# @!attribute logos
|
67
74
|
# An array of logos associated with the brand
|
68
75
|
#
|
@@ -96,7 +103,7 @@ module BrandDev
|
|
96
103
|
# @return [String, nil]
|
97
104
|
optional :title, String
|
98
105
|
|
99
|
-
# @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, logos: nil, slogan: nil, socials: nil, stock: nil, title: nil)
|
106
|
+
# @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, fonts: nil, logos: nil, slogan: nil, socials: nil, stock: nil, title: nil)
|
100
107
|
# Some parameter documentations has been truncated, see
|
101
108
|
# {BrandDev::Models::BrandRetrieveByTickerResponse::Brand} for more details.
|
102
109
|
#
|
@@ -112,6 +119,8 @@ module BrandDev
|
|
112
119
|
#
|
113
120
|
# @param domain [String] The domain name of the brand
|
114
121
|
#
|
122
|
+
# @param fonts [Array<BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Font>] An array of fonts used by the brand's website
|
123
|
+
#
|
115
124
|
# @param logos [Array<BrandDev::Models::BrandRetrieveByTickerResponse::Brand::Logo>] An array of logos associated with the brand
|
116
125
|
#
|
117
126
|
# @param slogan [String] The brand's slogan
|
@@ -272,6 +281,25 @@ module BrandDev
|
|
272
281
|
# @param name [String] Name of the color
|
273
282
|
end
|
274
283
|
|
284
|
+
class Font < BrandDev::Internal::Type::BaseModel
|
285
|
+
# @!attribute name
|
286
|
+
# Name of the font
|
287
|
+
#
|
288
|
+
# @return [String, nil]
|
289
|
+
optional :name, String
|
290
|
+
|
291
|
+
# @!attribute usage
|
292
|
+
# Usage of the font, e.g., 'title', 'body', 'button'
|
293
|
+
#
|
294
|
+
# @return [String, nil]
|
295
|
+
optional :usage, String
|
296
|
+
|
297
|
+
# @!method initialize(name: nil, usage: nil)
|
298
|
+
# @param name [String] Name of the font
|
299
|
+
#
|
300
|
+
# @param usage [String] Usage of the font, e.g., 'title', 'body', 'button'
|
301
|
+
end
|
302
|
+
|
275
303
|
class Logo < BrandDev::Internal::Type::BaseModel
|
276
304
|
# @!attribute colors
|
277
305
|
# Array of colors in the logo
|
@@ -15,22 +15,12 @@ module BrandDev
|
|
15
15
|
# @return [String]
|
16
16
|
required :input, String
|
17
17
|
|
18
|
-
# @!
|
19
|
-
# Optional timeout in milliseconds for the request. If the request takes longer
|
20
|
-
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
21
|
-
# value is 300000ms (5 minutes).
|
22
|
-
#
|
23
|
-
# @return [Integer, nil]
|
24
|
-
optional :timeout_ms, Integer
|
25
|
-
|
26
|
-
# @!method initialize(input:, timeout_ms: nil, request_options: {})
|
18
|
+
# @!method initialize(input:, request_options: {})
|
27
19
|
# Some parameter documentations has been truncated, see
|
28
20
|
# {BrandDev::Models::BrandRetrieveNaicsParams} for more details.
|
29
21
|
#
|
30
22
|
# @param input [String] Brand domain or title to retrieve NAICS code for. If a valid domain is provided
|
31
23
|
#
|
32
|
-
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
33
|
-
#
|
34
24
|
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
|
35
25
|
end
|
36
26
|
end
|
@@ -19,34 +19,11 @@ module BrandDev
|
|
19
19
|
# @return [Symbol, BrandDev::Models::BrandRetrieveParams::ForceLanguage, nil]
|
20
20
|
optional :force_language, enum: -> { BrandDev::BrandRetrieveParams::ForceLanguage }
|
21
21
|
|
22
|
-
# @!
|
23
|
-
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
24
|
-
# the API will skip time-consuming operations for faster response at the cost of
|
25
|
-
# less comprehensive data.
|
26
|
-
#
|
27
|
-
# @return [Boolean, nil]
|
28
|
-
optional :max_speed, BrandDev::Internal::Type::Boolean
|
29
|
-
|
30
|
-
# @!attribute timeout_ms
|
31
|
-
# Optional timeout in milliseconds for the request. If the request takes longer
|
32
|
-
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
33
|
-
# value is 300000ms (5 minutes).
|
34
|
-
#
|
35
|
-
# @return [Integer, nil]
|
36
|
-
optional :timeout_ms, Integer
|
37
|
-
|
38
|
-
# @!method initialize(domain:, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {})
|
39
|
-
# Some parameter documentations has been truncated, see
|
40
|
-
# {BrandDev::Models::BrandRetrieveParams} for more details.
|
41
|
-
#
|
22
|
+
# @!method initialize(domain:, force_language: nil, request_options: {})
|
42
23
|
# @param domain [String] Domain name to retrieve brand data for
|
43
24
|
#
|
44
25
|
# @param force_language [Symbol, BrandDev::Models::BrandRetrieveParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data
|
45
26
|
#
|
46
|
-
# @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
|
47
|
-
#
|
48
|
-
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
49
|
-
#
|
50
27
|
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
|
51
28
|
|
52
29
|
# Optional parameter to force the language of the retrieved brand data
|
@@ -63,6 +63,13 @@ module BrandDev
|
|
63
63
|
# @return [String, nil]
|
64
64
|
optional :domain, String
|
65
65
|
|
66
|
+
# @!attribute fonts
|
67
|
+
# An array of fonts used by the brand's website
|
68
|
+
#
|
69
|
+
# @return [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Font>, nil]
|
70
|
+
optional :fonts,
|
71
|
+
-> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandRetrieveResponse::Brand::Font] }
|
72
|
+
|
66
73
|
# @!attribute logos
|
67
74
|
# An array of logos associated with the brand
|
68
75
|
#
|
@@ -96,7 +103,7 @@ module BrandDev
|
|
96
103
|
# @return [String, nil]
|
97
104
|
optional :title, String
|
98
105
|
|
99
|
-
# @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, logos: nil, slogan: nil, socials: nil, stock: nil, title: nil)
|
106
|
+
# @!method initialize(address: nil, backdrops: nil, colors: nil, description: nil, domain: nil, fonts: nil, logos: nil, slogan: nil, socials: nil, stock: nil, title: nil)
|
100
107
|
# Some parameter documentations has been truncated, see
|
101
108
|
# {BrandDev::Models::BrandRetrieveResponse::Brand} for more details.
|
102
109
|
#
|
@@ -112,6 +119,8 @@ module BrandDev
|
|
112
119
|
#
|
113
120
|
# @param domain [String] The domain name of the brand
|
114
121
|
#
|
122
|
+
# @param fonts [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Font>] An array of fonts used by the brand's website
|
123
|
+
#
|
115
124
|
# @param logos [Array<BrandDev::Models::BrandRetrieveResponse::Brand::Logo>] An array of logos associated with the brand
|
116
125
|
#
|
117
126
|
# @param slogan [String] The brand's slogan
|
@@ -272,6 +281,25 @@ module BrandDev
|
|
272
281
|
# @param name [String] Name of the color
|
273
282
|
end
|
274
283
|
|
284
|
+
class Font < BrandDev::Internal::Type::BaseModel
|
285
|
+
# @!attribute name
|
286
|
+
# Name of the font
|
287
|
+
#
|
288
|
+
# @return [String, nil]
|
289
|
+
optional :name, String
|
290
|
+
|
291
|
+
# @!attribute usage
|
292
|
+
# Usage of the font, e.g., 'title', 'body', 'button'
|
293
|
+
#
|
294
|
+
# @return [String, nil]
|
295
|
+
optional :usage, String
|
296
|
+
|
297
|
+
# @!method initialize(name: nil, usage: nil)
|
298
|
+
# @param name [String] Name of the font
|
299
|
+
#
|
300
|
+
# @param usage [String] Usage of the font, e.g., 'title', 'body', 'button'
|
301
|
+
end
|
302
|
+
|
275
303
|
class Logo < BrandDev::Internal::Type::BaseModel
|
276
304
|
# @!attribute colors
|
277
305
|
# Array of colors in the logo
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BrandDev
|
4
|
+
module Models
|
5
|
+
# @see BrandDev::Resources::Brand#search
|
6
|
+
class BrandSearchParams < BrandDev::Internal::Type::BaseModel
|
7
|
+
extend BrandDev::Internal::Type::RequestParameters::Converter
|
8
|
+
include BrandDev::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
# @!attribute query
|
11
|
+
# Query string to search brands
|
12
|
+
#
|
13
|
+
# @return [String]
|
14
|
+
required :query, String
|
15
|
+
|
16
|
+
# @!method initialize(query:, request_options: {})
|
17
|
+
# @param query [String] Query string to search brands
|
18
|
+
#
|
19
|
+
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|