context.dev 0.0.2
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 +7 -0
- data/.ignore +2 -0
- data/CHANGELOG.md +10 -0
- data/README.md +244 -0
- data/SECURITY.md +27 -0
- data/lib/context_dev/client.rb +74 -0
- data/lib/context_dev/errors.rb +228 -0
- data/lib/context_dev/file_part.rb +58 -0
- data/lib/context_dev/internal/transport/base_client.rb +573 -0
- data/lib/context_dev/internal/transport/pooled_net_requester.rb +210 -0
- data/lib/context_dev/internal/type/array_of.rb +168 -0
- data/lib/context_dev/internal/type/base_model.rb +531 -0
- data/lib/context_dev/internal/type/base_page.rb +55 -0
- data/lib/context_dev/internal/type/boolean.rb +77 -0
- data/lib/context_dev/internal/type/converter.rb +327 -0
- data/lib/context_dev/internal/type/enum.rb +131 -0
- data/lib/context_dev/internal/type/file_input.rb +111 -0
- data/lib/context_dev/internal/type/hash_of.rb +188 -0
- data/lib/context_dev/internal/type/request_parameters.rb +42 -0
- data/lib/context_dev/internal/type/union.rb +237 -0
- data/lib/context_dev/internal/type/unknown.rb +81 -0
- data/lib/context_dev/internal/util.rb +951 -0
- data/lib/context_dev/internal.rb +20 -0
- data/lib/context_dev/models/brand_ai_product_params.rb +34 -0
- data/lib/context_dev/models/brand_ai_product_response.rb +193 -0
- data/lib/context_dev/models/brand_ai_products_params.rb +94 -0
- data/lib/context_dev/models/brand_ai_products_response.rb +160 -0
- data/lib/context_dev/models/brand_ai_query_params.rb +236 -0
- data/lib/context_dev/models/brand_ai_query_response.rb +98 -0
- data/lib/context_dev/models/brand_fonts_params.rb +36 -0
- data/lib/context_dev/models/brand_fonts_response.rb +100 -0
- data/lib/context_dev/models/brand_identify_from_transaction_params.rb +407 -0
- data/lib/context_dev/models/brand_identify_from_transaction_response.rb +854 -0
- data/lib/context_dev/models/brand_prefetch_by_email_params.rb +37 -0
- data/lib/context_dev/models/brand_prefetch_by_email_response.rb +33 -0
- data/lib/context_dev/models/brand_prefetch_params.rb +35 -0
- data/lib/context_dev/models/brand_prefetch_response.rb +33 -0
- data/lib/context_dev/models/brand_retrieve_by_email_params.rb +116 -0
- data/lib/context_dev/models/brand_retrieve_by_email_response.rb +851 -0
- data/lib/context_dev/models/brand_retrieve_by_isin_params.rb +116 -0
- data/lib/context_dev/models/brand_retrieve_by_isin_response.rb +850 -0
- data/lib/context_dev/models/brand_retrieve_by_name_params.rb +115 -0
- data/lib/context_dev/models/brand_retrieve_by_name_response.rb +850 -0
- data/lib/context_dev/models/brand_retrieve_by_ticker_params.rb +204 -0
- data/lib/context_dev/models/brand_retrieve_by_ticker_response.rb +852 -0
- data/lib/context_dev/models/brand_retrieve_naics_params.rb +54 -0
- data/lib/context_dev/models/brand_retrieve_naics_response.rb +83 -0
- data/lib/context_dev/models/brand_retrieve_params.rb +117 -0
- data/lib/context_dev/models/brand_retrieve_response.rb +850 -0
- data/lib/context_dev/models/brand_retrieve_simplified_params.rb +35 -0
- data/lib/context_dev/models/brand_retrieve_simplified_response.rb +307 -0
- data/lib/context_dev/models/brand_screenshot_params.rb +103 -0
- data/lib/context_dev/models/brand_screenshot_response.rb +64 -0
- data/lib/context_dev/models/brand_styleguide_params.rb +70 -0
- data/lib/context_dev/models/brand_styleguide_response.rb +790 -0
- data/lib/context_dev/models/brand_web_scrape_html_params.rb +22 -0
- data/lib/context_dev/models/brand_web_scrape_html_response.rb +45 -0
- data/lib/context_dev/models/brand_web_scrape_images_params.rb +22 -0
- data/lib/context_dev/models/brand_web_scrape_images_response.rb +111 -0
- data/lib/context_dev/models/brand_web_scrape_md_params.rb +50 -0
- data/lib/context_dev/models/brand_web_scrape_md_response.rb +45 -0
- data/lib/context_dev/models/brand_web_scrape_sitemap_params.rb +26 -0
- data/lib/context_dev/models/brand_web_scrape_sitemap_response.rb +91 -0
- data/lib/context_dev/models.rb +81 -0
- data/lib/context_dev/request_options.rb +77 -0
- data/lib/context_dev/resources/brand.rb +654 -0
- data/lib/context_dev/version.rb +5 -0
- data/lib/context_dev.rb +96 -0
- data/manifest.yaml +17 -0
- data/rbi/context_dev/client.rbi +49 -0
- data/rbi/context_dev/errors.rbi +205 -0
- data/rbi/context_dev/file_part.rbi +37 -0
- data/rbi/context_dev/internal/transport/base_client.rbi +300 -0
- data/rbi/context_dev/internal/transport/pooled_net_requester.rbi +84 -0
- data/rbi/context_dev/internal/type/array_of.rbi +104 -0
- data/rbi/context_dev/internal/type/base_model.rbi +308 -0
- data/rbi/context_dev/internal/type/base_page.rbi +42 -0
- data/rbi/context_dev/internal/type/boolean.rbi +58 -0
- data/rbi/context_dev/internal/type/converter.rbi +216 -0
- data/rbi/context_dev/internal/type/enum.rbi +82 -0
- data/rbi/context_dev/internal/type/file_input.rbi +59 -0
- data/rbi/context_dev/internal/type/hash_of.rbi +104 -0
- data/rbi/context_dev/internal/type/request_parameters.rbi +29 -0
- data/rbi/context_dev/internal/type/union.rbi +128 -0
- data/rbi/context_dev/internal/type/unknown.rbi +58 -0
- data/rbi/context_dev/internal/util.rbi +507 -0
- data/rbi/context_dev/internal.rbi +18 -0
- data/rbi/context_dev/models/brand_ai_product_params.rbi +56 -0
- data/rbi/context_dev/models/brand_ai_product_response.rbi +380 -0
- data/rbi/context_dev/models/brand_ai_products_params.rbi +188 -0
- data/rbi/context_dev/models/brand_ai_products_response.rbi +310 -0
- data/rbi/context_dev/models/brand_ai_query_params.rbi +504 -0
- data/rbi/context_dev/models/brand_ai_query_response.rbi +205 -0
- data/rbi/context_dev/models/brand_fonts_params.rbi +60 -0
- data/rbi/context_dev/models/brand_fonts_response.rbi +147 -0
- data/rbi/context_dev/models/brand_identify_from_transaction_params.rbi +1682 -0
- data/rbi/context_dev/models/brand_identify_from_transaction_response.rbi +2595 -0
- data/rbi/context_dev/models/brand_prefetch_by_email_params.rbi +65 -0
- data/rbi/context_dev/models/brand_prefetch_by_email_response.rbi +57 -0
- data/rbi/context_dev/models/brand_prefetch_params.rbi +58 -0
- data/rbi/context_dev/models/brand_prefetch_response.rbi +57 -0
- data/rbi/context_dev/models/brand_retrieve_by_email_params.rbi +386 -0
- data/rbi/context_dev/models/brand_retrieve_by_email_response.rbi +2591 -0
- data/rbi/context_dev/models/brand_retrieve_by_isin_params.rbi +386 -0
- data/rbi/context_dev/models/brand_retrieve_by_isin_response.rbi +2590 -0
- data/rbi/context_dev/models/brand_retrieve_by_name_params.rbi +384 -0
- data/rbi/context_dev/models/brand_retrieve_by_name_response.rbi +2590 -0
- data/rbi/context_dev/models/brand_retrieve_by_ticker_params.rbi +796 -0
- data/rbi/context_dev/models/brand_retrieve_by_ticker_response.rbi +2592 -0
- data/rbi/context_dev/models/brand_retrieve_naics_params.rbi +89 -0
- data/rbi/context_dev/models/brand_retrieve_naics_response.rbi +190 -0
- data/rbi/context_dev/models/brand_retrieve_params.rbi +382 -0
- data/rbi/context_dev/models/brand_retrieve_response.rbi +2574 -0
- data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +61 -0
- data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +763 -0
- data/rbi/context_dev/models/brand_screenshot_params.rbi +225 -0
- data/rbi/context_dev/models/brand_screenshot_response.rbi +135 -0
- data/rbi/context_dev/models/brand_styleguide_params.rbi +139 -0
- data/rbi/context_dev/models/brand_styleguide_response.rbi +1707 -0
- data/rbi/context_dev/models/brand_web_scrape_html_params.rbi +43 -0
- data/rbi/context_dev/models/brand_web_scrape_html_response.rbi +92 -0
- data/rbi/context_dev/models/brand_web_scrape_images_params.rbi +43 -0
- data/rbi/context_dev/models/brand_web_scrape_images_response.rbi +261 -0
- data/rbi/context_dev/models/brand_web_scrape_md_params.rbi +81 -0
- data/rbi/context_dev/models/brand_web_scrape_md_response.rbi +92 -0
- data/rbi/context_dev/models/brand_web_scrape_sitemap_params.rbi +45 -0
- data/rbi/context_dev/models/brand_web_scrape_sitemap_response.rbi +167 -0
- data/rbi/context_dev/models.rbi +45 -0
- data/rbi/context_dev/request_options.rbi +59 -0
- data/rbi/context_dev/resources/brand.rbi +545 -0
- data/rbi/context_dev/version.rbi +5 -0
- data/sig/context_dev/client.rbs +26 -0
- data/sig/context_dev/errors.rbs +117 -0
- data/sig/context_dev/file_part.rbs +21 -0
- data/sig/context_dev/internal/transport/base_client.rbs +133 -0
- data/sig/context_dev/internal/transport/pooled_net_requester.rbs +48 -0
- data/sig/context_dev/internal/type/array_of.rbs +48 -0
- data/sig/context_dev/internal/type/base_model.rbs +102 -0
- data/sig/context_dev/internal/type/base_page.rbs +24 -0
- data/sig/context_dev/internal/type/boolean.rbs +26 -0
- data/sig/context_dev/internal/type/converter.rbs +79 -0
- data/sig/context_dev/internal/type/enum.rbs +32 -0
- data/sig/context_dev/internal/type/file_input.rbs +25 -0
- data/sig/context_dev/internal/type/hash_of.rbs +48 -0
- data/sig/context_dev/internal/type/request_parameters.rbs +19 -0
- data/sig/context_dev/internal/type/union.rbs +52 -0
- data/sig/context_dev/internal/type/unknown.rbs +26 -0
- data/sig/context_dev/internal/util.rbs +195 -0
- data/sig/context_dev/internal.rbs +9 -0
- data/sig/context_dev/models/brand_ai_product_params.rbs +30 -0
- data/sig/context_dev/models/brand_ai_product_response.rbs +149 -0
- data/sig/context_dev/models/brand_ai_products_params.rbs +88 -0
- data/sig/context_dev/models/brand_ai_products_response.rbs +128 -0
- data/sig/context_dev/models/brand_ai_query_params.rbs +218 -0
- data/sig/context_dev/models/brand_ai_query_response.rbs +93 -0
- data/sig/context_dev/models/brand_fonts_params.rbs +30 -0
- data/sig/context_dev/models/brand_fonts_response.rbs +82 -0
- data/sig/context_dev/models/brand_identify_from_transaction_params.rbs +686 -0
- data/sig/context_dev/models/brand_identify_from_transaction_response.rbs +1076 -0
- data/sig/context_dev/models/brand_prefetch_by_email_params.rbs +30 -0
- data/sig/context_dev/models/brand_prefetch_by_email_response.rbs +28 -0
- data/sig/context_dev/models/brand_prefetch_params.rbs +30 -0
- data/sig/context_dev/models/brand_prefetch_response.rbs +28 -0
- data/sig/context_dev/models/brand_retrieve_by_email_params.rbs +162 -0
- data/sig/context_dev/models/brand_retrieve_by_email_response.rbs +1076 -0
- data/sig/context_dev/models/brand_retrieve_by_isin_params.rbs +162 -0
- data/sig/context_dev/models/brand_retrieve_by_isin_response.rbs +1076 -0
- data/sig/context_dev/models/brand_retrieve_by_name_params.rbs +162 -0
- data/sig/context_dev/models/brand_retrieve_by_name_response.rbs +1076 -0
- data/sig/context_dev/models/brand_retrieve_by_ticker_params.rbs +324 -0
- data/sig/context_dev/models/brand_retrieve_by_ticker_response.rbs +1076 -0
- data/sig/context_dev/models/brand_retrieve_naics_params.rbs +47 -0
- data/sig/context_dev/models/brand_retrieve_naics_response.rbs +84 -0
- data/sig/context_dev/models/brand_retrieve_params.rbs +162 -0
- data/sig/context_dev/models/brand_retrieve_response.rbs +1076 -0
- data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +30 -0
- data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +312 -0
- data/sig/context_dev/models/brand_screenshot_params.rbs +100 -0
- data/sig/context_dev/models/brand_screenshot_response.rbs +63 -0
- data/sig/context_dev/models/brand_styleguide_params.rbs +62 -0
- data/sig/context_dev/models/brand_styleguide_response.rbs +945 -0
- data/sig/context_dev/models/brand_web_scrape_html_params.rbs +23 -0
- data/sig/context_dev/models/brand_web_scrape_html_response.rbs +40 -0
- data/sig/context_dev/models/brand_web_scrape_images_params.rbs +23 -0
- data/sig/context_dev/models/brand_web_scrape_images_response.rbs +98 -0
- data/sig/context_dev/models/brand_web_scrape_md_params.rbs +47 -0
- data/sig/context_dev/models/brand_web_scrape_md_response.rbs +40 -0
- data/sig/context_dev/models/brand_web_scrape_sitemap_params.rbs +23 -0
- data/sig/context_dev/models/brand_web_scrape_sitemap_response.rbs +77 -0
- data/sig/context_dev/models.rbs +41 -0
- data/sig/context_dev/request_options.rbs +36 -0
- data/sig/context_dev/resources/brand.rbs +151 -0
- data/sig/context_dev/version.rbs +3 -0
- metadata +265 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Brand#retrieve_simplified
|
|
6
|
+
class BrandRetrieveSimplifiedParams < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ContextDev::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute domain
|
|
11
|
+
# Domain name to retrieve simplified brand data for
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :domain, String
|
|
15
|
+
|
|
16
|
+
# @!attribute timeout_ms
|
|
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(domain:, timeout_ms: nil, request_options: {})
|
|
25
|
+
# Some parameter documentations has been truncated, see
|
|
26
|
+
# {ContextDev::Models::BrandRetrieveSimplifiedParams} for more details.
|
|
27
|
+
#
|
|
28
|
+
# @param domain [String] Domain name to retrieve simplified brand data for
|
|
29
|
+
#
|
|
30
|
+
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
31
|
+
#
|
|
32
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Brand#retrieve_simplified
|
|
6
|
+
class BrandRetrieveSimplifiedResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute brand
|
|
8
|
+
# Simplified brand information
|
|
9
|
+
#
|
|
10
|
+
# @return [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand, nil]
|
|
11
|
+
optional :brand, -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand }
|
|
12
|
+
|
|
13
|
+
# @!attribute code
|
|
14
|
+
# HTTP status code of the response
|
|
15
|
+
#
|
|
16
|
+
# @return [Integer, nil]
|
|
17
|
+
optional :code, Integer
|
|
18
|
+
|
|
19
|
+
# @!attribute status
|
|
20
|
+
# Status of the response, e.g., 'ok'
|
|
21
|
+
#
|
|
22
|
+
# @return [String, nil]
|
|
23
|
+
optional :status, String
|
|
24
|
+
|
|
25
|
+
# @!method initialize(brand: nil, code: nil, status: nil)
|
|
26
|
+
# @param brand [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand] Simplified brand information
|
|
27
|
+
#
|
|
28
|
+
# @param code [Integer] HTTP status code of the response
|
|
29
|
+
#
|
|
30
|
+
# @param status [String] Status of the response, e.g., 'ok'
|
|
31
|
+
|
|
32
|
+
# @see ContextDev::Models::BrandRetrieveSimplifiedResponse#brand
|
|
33
|
+
class Brand < ContextDev::Internal::Type::BaseModel
|
|
34
|
+
# @!attribute backdrops
|
|
35
|
+
# An array of backdrop images for the brand
|
|
36
|
+
#
|
|
37
|
+
# @return [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop>, nil]
|
|
38
|
+
optional :backdrops,
|
|
39
|
+
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop] }
|
|
40
|
+
|
|
41
|
+
# @!attribute colors
|
|
42
|
+
# An array of brand colors
|
|
43
|
+
#
|
|
44
|
+
# @return [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color>, nil]
|
|
45
|
+
optional :colors,
|
|
46
|
+
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color] }
|
|
47
|
+
|
|
48
|
+
# @!attribute domain
|
|
49
|
+
# The domain name of the brand
|
|
50
|
+
#
|
|
51
|
+
# @return [String, nil]
|
|
52
|
+
optional :domain, String
|
|
53
|
+
|
|
54
|
+
# @!attribute logos
|
|
55
|
+
# An array of logos associated with the brand
|
|
56
|
+
#
|
|
57
|
+
# @return [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo>, nil]
|
|
58
|
+
optional :logos,
|
|
59
|
+
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo] }
|
|
60
|
+
|
|
61
|
+
# @!attribute title
|
|
62
|
+
# The title or name of the brand
|
|
63
|
+
#
|
|
64
|
+
# @return [String, nil]
|
|
65
|
+
optional :title, String
|
|
66
|
+
|
|
67
|
+
# @!method initialize(backdrops: nil, colors: nil, domain: nil, logos: nil, title: nil)
|
|
68
|
+
# Simplified brand information
|
|
69
|
+
#
|
|
70
|
+
# @param backdrops [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop>] An array of backdrop images for the brand
|
|
71
|
+
#
|
|
72
|
+
# @param colors [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Color>] An array of brand colors
|
|
73
|
+
#
|
|
74
|
+
# @param domain [String] The domain name of the brand
|
|
75
|
+
#
|
|
76
|
+
# @param logos [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo>] An array of logos associated with the brand
|
|
77
|
+
#
|
|
78
|
+
# @param title [String] The title or name of the brand
|
|
79
|
+
|
|
80
|
+
class Backdrop < ContextDev::Internal::Type::BaseModel
|
|
81
|
+
# @!attribute colors
|
|
82
|
+
# Array of colors in the backdrop image
|
|
83
|
+
#
|
|
84
|
+
# @return [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Color>, nil]
|
|
85
|
+
optional :colors,
|
|
86
|
+
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Color] }
|
|
87
|
+
|
|
88
|
+
# @!attribute resolution
|
|
89
|
+
# Resolution of the backdrop image
|
|
90
|
+
#
|
|
91
|
+
# @return [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Resolution, nil]
|
|
92
|
+
optional :resolution,
|
|
93
|
+
-> { ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Resolution }
|
|
94
|
+
|
|
95
|
+
# @!attribute url
|
|
96
|
+
# URL of the backdrop image
|
|
97
|
+
#
|
|
98
|
+
# @return [String, nil]
|
|
99
|
+
optional :url, String
|
|
100
|
+
|
|
101
|
+
# @!method initialize(colors: nil, resolution: nil, url: nil)
|
|
102
|
+
# @param colors [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Color>] Array of colors in the backdrop image
|
|
103
|
+
#
|
|
104
|
+
# @param resolution [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Resolution] Resolution of the backdrop image
|
|
105
|
+
#
|
|
106
|
+
# @param url [String] URL of the backdrop image
|
|
107
|
+
|
|
108
|
+
class Color < ContextDev::Internal::Type::BaseModel
|
|
109
|
+
# @!attribute hex
|
|
110
|
+
# Color in hexadecimal format
|
|
111
|
+
#
|
|
112
|
+
# @return [String, nil]
|
|
113
|
+
optional :hex, String
|
|
114
|
+
|
|
115
|
+
# @!attribute name
|
|
116
|
+
# Name of the color
|
|
117
|
+
#
|
|
118
|
+
# @return [String, nil]
|
|
119
|
+
optional :name, String
|
|
120
|
+
|
|
121
|
+
# @!method initialize(hex: nil, name: nil)
|
|
122
|
+
# @param hex [String] Color in hexadecimal format
|
|
123
|
+
#
|
|
124
|
+
# @param name [String] Name of the color
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# @see ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop#resolution
|
|
128
|
+
class Resolution < ContextDev::Internal::Type::BaseModel
|
|
129
|
+
# @!attribute aspect_ratio
|
|
130
|
+
# Aspect ratio of the image (width/height)
|
|
131
|
+
#
|
|
132
|
+
# @return [Float, nil]
|
|
133
|
+
optional :aspect_ratio, Float
|
|
134
|
+
|
|
135
|
+
# @!attribute height
|
|
136
|
+
# Height of the image in pixels
|
|
137
|
+
#
|
|
138
|
+
# @return [Integer, nil]
|
|
139
|
+
optional :height, Integer
|
|
140
|
+
|
|
141
|
+
# @!attribute width
|
|
142
|
+
# Width of the image in pixels
|
|
143
|
+
#
|
|
144
|
+
# @return [Integer, nil]
|
|
145
|
+
optional :width, Integer
|
|
146
|
+
|
|
147
|
+
# @!method initialize(aspect_ratio: nil, height: nil, width: nil)
|
|
148
|
+
# Resolution of the backdrop image
|
|
149
|
+
#
|
|
150
|
+
# @param aspect_ratio [Float] Aspect ratio of the image (width/height)
|
|
151
|
+
#
|
|
152
|
+
# @param height [Integer] Height of the image in pixels
|
|
153
|
+
#
|
|
154
|
+
# @param width [Integer] Width of the image in pixels
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
class Color < ContextDev::Internal::Type::BaseModel
|
|
159
|
+
# @!attribute hex
|
|
160
|
+
# Color in hexadecimal format
|
|
161
|
+
#
|
|
162
|
+
# @return [String, nil]
|
|
163
|
+
optional :hex, String
|
|
164
|
+
|
|
165
|
+
# @!attribute name
|
|
166
|
+
# Name of the color
|
|
167
|
+
#
|
|
168
|
+
# @return [String, nil]
|
|
169
|
+
optional :name, String
|
|
170
|
+
|
|
171
|
+
# @!method initialize(hex: nil, name: nil)
|
|
172
|
+
# @param hex [String] Color in hexadecimal format
|
|
173
|
+
#
|
|
174
|
+
# @param name [String] Name of the color
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
class Logo < ContextDev::Internal::Type::BaseModel
|
|
178
|
+
# @!attribute colors
|
|
179
|
+
# Array of colors in the logo
|
|
180
|
+
#
|
|
181
|
+
# @return [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Color>, nil]
|
|
182
|
+
optional :colors,
|
|
183
|
+
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Color] }
|
|
184
|
+
|
|
185
|
+
# @!attribute mode
|
|
186
|
+
# Indicates when this logo is best used: 'light' = best for light mode, 'dark' =
|
|
187
|
+
# best for dark mode, 'has_opaque_background' = can be used for either as image
|
|
188
|
+
# has its own background
|
|
189
|
+
#
|
|
190
|
+
# @return [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Mode, nil]
|
|
191
|
+
optional :mode, enum: -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Mode }
|
|
192
|
+
|
|
193
|
+
# @!attribute resolution
|
|
194
|
+
# Resolution of the logo image
|
|
195
|
+
#
|
|
196
|
+
# @return [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Resolution, nil]
|
|
197
|
+
optional :resolution, -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Resolution }
|
|
198
|
+
|
|
199
|
+
# @!attribute type
|
|
200
|
+
# Type of the logo based on resolution (e.g., 'icon', 'logo')
|
|
201
|
+
#
|
|
202
|
+
# @return [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Type, nil]
|
|
203
|
+
optional :type, enum: -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Type }
|
|
204
|
+
|
|
205
|
+
# @!attribute url
|
|
206
|
+
# CDN hosted url of the logo (ready for display)
|
|
207
|
+
#
|
|
208
|
+
# @return [String, nil]
|
|
209
|
+
optional :url, String
|
|
210
|
+
|
|
211
|
+
# @!method initialize(colors: nil, mode: nil, resolution: nil, type: nil, url: nil)
|
|
212
|
+
# Some parameter documentations has been truncated, see
|
|
213
|
+
# {ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo} for more
|
|
214
|
+
# details.
|
|
215
|
+
#
|
|
216
|
+
# @param colors [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Color>] Array of colors in the logo
|
|
217
|
+
#
|
|
218
|
+
# @param mode [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Mode] Indicates when this logo is best used: 'light' = best for light mode, 'dark' = b
|
|
219
|
+
#
|
|
220
|
+
# @param resolution [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Resolution] Resolution of the logo image
|
|
221
|
+
#
|
|
222
|
+
# @param type [Symbol, ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo::Type] Type of the logo based on resolution (e.g., 'icon', 'logo')
|
|
223
|
+
#
|
|
224
|
+
# @param url [String] CDN hosted url of the logo (ready for display)
|
|
225
|
+
|
|
226
|
+
class Color < ContextDev::Internal::Type::BaseModel
|
|
227
|
+
# @!attribute hex
|
|
228
|
+
# Color in hexadecimal format
|
|
229
|
+
#
|
|
230
|
+
# @return [String, nil]
|
|
231
|
+
optional :hex, String
|
|
232
|
+
|
|
233
|
+
# @!attribute name
|
|
234
|
+
# Name of the color
|
|
235
|
+
#
|
|
236
|
+
# @return [String, nil]
|
|
237
|
+
optional :name, String
|
|
238
|
+
|
|
239
|
+
# @!method initialize(hex: nil, name: nil)
|
|
240
|
+
# @param hex [String] Color in hexadecimal format
|
|
241
|
+
#
|
|
242
|
+
# @param name [String] Name of the color
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Indicates when this logo is best used: 'light' = best for light mode, 'dark' =
|
|
246
|
+
# best for dark mode, 'has_opaque_background' = can be used for either as image
|
|
247
|
+
# has its own background
|
|
248
|
+
#
|
|
249
|
+
# @see ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo#mode
|
|
250
|
+
module Mode
|
|
251
|
+
extend ContextDev::Internal::Type::Enum
|
|
252
|
+
|
|
253
|
+
LIGHT = :light
|
|
254
|
+
DARK = :dark
|
|
255
|
+
HAS_OPAQUE_BACKGROUND = :has_opaque_background
|
|
256
|
+
|
|
257
|
+
# @!method self.values
|
|
258
|
+
# @return [Array<Symbol>]
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# @see ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo#resolution
|
|
262
|
+
class Resolution < ContextDev::Internal::Type::BaseModel
|
|
263
|
+
# @!attribute aspect_ratio
|
|
264
|
+
# Aspect ratio of the image (width/height)
|
|
265
|
+
#
|
|
266
|
+
# @return [Float, nil]
|
|
267
|
+
optional :aspect_ratio, Float
|
|
268
|
+
|
|
269
|
+
# @!attribute height
|
|
270
|
+
# Height of the image in pixels
|
|
271
|
+
#
|
|
272
|
+
# @return [Integer, nil]
|
|
273
|
+
optional :height, Integer
|
|
274
|
+
|
|
275
|
+
# @!attribute width
|
|
276
|
+
# Width of the image in pixels
|
|
277
|
+
#
|
|
278
|
+
# @return [Integer, nil]
|
|
279
|
+
optional :width, Integer
|
|
280
|
+
|
|
281
|
+
# @!method initialize(aspect_ratio: nil, height: nil, width: nil)
|
|
282
|
+
# Resolution of the logo image
|
|
283
|
+
#
|
|
284
|
+
# @param aspect_ratio [Float] Aspect ratio of the image (width/height)
|
|
285
|
+
#
|
|
286
|
+
# @param height [Integer] Height of the image in pixels
|
|
287
|
+
#
|
|
288
|
+
# @param width [Integer] Width of the image in pixels
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Type of the logo based on resolution (e.g., 'icon', 'logo')
|
|
292
|
+
#
|
|
293
|
+
# @see ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Logo#type
|
|
294
|
+
module Type
|
|
295
|
+
extend ContextDev::Internal::Type::Enum
|
|
296
|
+
|
|
297
|
+
ICON = :icon
|
|
298
|
+
LOGO = :logo
|
|
299
|
+
|
|
300
|
+
# @!method self.values
|
|
301
|
+
# @return [Array<Symbol>]
|
|
302
|
+
end
|
|
303
|
+
end
|
|
304
|
+
end
|
|
305
|
+
end
|
|
306
|
+
end
|
|
307
|
+
end
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Brand#screenshot
|
|
6
|
+
class BrandScreenshotParams < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ContextDev::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute domain
|
|
11
|
+
# Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
|
|
12
|
+
# domain will be automatically normalized and validated.
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :domain, String
|
|
16
|
+
|
|
17
|
+
# @!attribute full_screenshot
|
|
18
|
+
# Optional parameter to determine screenshot type. If 'true', takes a full page
|
|
19
|
+
# screenshot capturing all content. If 'false' or not provided, takes a viewport
|
|
20
|
+
# screenshot (standard browser view).
|
|
21
|
+
#
|
|
22
|
+
# @return [Symbol, ContextDev::Models::BrandScreenshotParams::FullScreenshot, nil]
|
|
23
|
+
optional :full_screenshot, enum: -> { ContextDev::BrandScreenshotParams::FullScreenshot }
|
|
24
|
+
|
|
25
|
+
# @!attribute page
|
|
26
|
+
# Optional parameter to specify which page type to screenshot. If provided, the
|
|
27
|
+
# system will scrape the domain's links and use heuristics to find the most
|
|
28
|
+
# appropriate URL for the specified page type (30 supported languages). If not
|
|
29
|
+
# provided, screenshots the main domain landing page.
|
|
30
|
+
#
|
|
31
|
+
# @return [Symbol, ContextDev::Models::BrandScreenshotParams::Page, nil]
|
|
32
|
+
optional :page, enum: -> { ContextDev::BrandScreenshotParams::Page }
|
|
33
|
+
|
|
34
|
+
# @!attribute prioritize
|
|
35
|
+
# Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
|
|
36
|
+
# faster capture with basic quality. If 'quality', optimizes for higher quality
|
|
37
|
+
# with longer wait times. Defaults to 'quality' if not provided.
|
|
38
|
+
#
|
|
39
|
+
# @return [Symbol, ContextDev::Models::BrandScreenshotParams::Prioritize, nil]
|
|
40
|
+
optional :prioritize, enum: -> { ContextDev::BrandScreenshotParams::Prioritize }
|
|
41
|
+
|
|
42
|
+
# @!method initialize(domain:, full_screenshot: nil, page: nil, prioritize: nil, request_options: {})
|
|
43
|
+
# Some parameter documentations has been truncated, see
|
|
44
|
+
# {ContextDev::Models::BrandScreenshotParams} for more details.
|
|
45
|
+
#
|
|
46
|
+
# @param domain [String] Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The domai
|
|
47
|
+
#
|
|
48
|
+
# @param full_screenshot [Symbol, ContextDev::Models::BrandScreenshotParams::FullScreenshot] Optional parameter to determine screenshot type. If 'true', takes a full page sc
|
|
49
|
+
#
|
|
50
|
+
# @param page [Symbol, ContextDev::Models::BrandScreenshotParams::Page] Optional parameter to specify which page type to screenshot. If provided, the sy
|
|
51
|
+
#
|
|
52
|
+
# @param prioritize [Symbol, ContextDev::Models::BrandScreenshotParams::Prioritize] Optional parameter to prioritize screenshot capture. If 'speed', optimizes for f
|
|
53
|
+
#
|
|
54
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
55
|
+
|
|
56
|
+
# Optional parameter to determine screenshot type. If 'true', takes a full page
|
|
57
|
+
# screenshot capturing all content. If 'false' or not provided, takes a viewport
|
|
58
|
+
# screenshot (standard browser view).
|
|
59
|
+
module FullScreenshot
|
|
60
|
+
extend ContextDev::Internal::Type::Enum
|
|
61
|
+
|
|
62
|
+
TRUE = :true
|
|
63
|
+
FALSE = :false
|
|
64
|
+
|
|
65
|
+
# @!method self.values
|
|
66
|
+
# @return [Array<Symbol>]
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Optional parameter to specify which page type to screenshot. If provided, the
|
|
70
|
+
# system will scrape the domain's links and use heuristics to find the most
|
|
71
|
+
# appropriate URL for the specified page type (30 supported languages). If not
|
|
72
|
+
# provided, screenshots the main domain landing page.
|
|
73
|
+
module Page
|
|
74
|
+
extend ContextDev::Internal::Type::Enum
|
|
75
|
+
|
|
76
|
+
LOGIN = :login
|
|
77
|
+
SIGNUP = :signup
|
|
78
|
+
BLOG = :blog
|
|
79
|
+
CAREERS = :careers
|
|
80
|
+
PRICING = :pricing
|
|
81
|
+
TERMS = :terms
|
|
82
|
+
PRIVACY = :privacy
|
|
83
|
+
CONTACT = :contact
|
|
84
|
+
|
|
85
|
+
# @!method self.values
|
|
86
|
+
# @return [Array<Symbol>]
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
|
|
90
|
+
# faster capture with basic quality. If 'quality', optimizes for higher quality
|
|
91
|
+
# with longer wait times. Defaults to 'quality' if not provided.
|
|
92
|
+
module Prioritize
|
|
93
|
+
extend ContextDev::Internal::Type::Enum
|
|
94
|
+
|
|
95
|
+
SPEED = :speed
|
|
96
|
+
QUALITY = :quality
|
|
97
|
+
|
|
98
|
+
# @!method self.values
|
|
99
|
+
# @return [Array<Symbol>]
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Brand#screenshot
|
|
6
|
+
class BrandScreenshotResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute code
|
|
8
|
+
# HTTP status code
|
|
9
|
+
#
|
|
10
|
+
# @return [Integer, nil]
|
|
11
|
+
optional :code, Integer
|
|
12
|
+
|
|
13
|
+
# @!attribute domain
|
|
14
|
+
# The normalized domain that was processed
|
|
15
|
+
#
|
|
16
|
+
# @return [String, nil]
|
|
17
|
+
optional :domain, String
|
|
18
|
+
|
|
19
|
+
# @!attribute screenshot
|
|
20
|
+
# Public URL of the uploaded screenshot image
|
|
21
|
+
#
|
|
22
|
+
# @return [String, nil]
|
|
23
|
+
optional :screenshot, String
|
|
24
|
+
|
|
25
|
+
# @!attribute screenshot_type
|
|
26
|
+
# Type of screenshot that was captured
|
|
27
|
+
#
|
|
28
|
+
# @return [Symbol, ContextDev::Models::BrandScreenshotResponse::ScreenshotType, nil]
|
|
29
|
+
optional :screenshot_type,
|
|
30
|
+
enum: -> { ContextDev::Models::BrandScreenshotResponse::ScreenshotType },
|
|
31
|
+
api_name: :screenshotType
|
|
32
|
+
|
|
33
|
+
# @!attribute status
|
|
34
|
+
# Status of the response, e.g., 'ok'
|
|
35
|
+
#
|
|
36
|
+
# @return [String, nil]
|
|
37
|
+
optional :status, String
|
|
38
|
+
|
|
39
|
+
# @!method initialize(code: nil, domain: nil, screenshot: nil, screenshot_type: nil, status: nil)
|
|
40
|
+
# @param code [Integer] HTTP status code
|
|
41
|
+
#
|
|
42
|
+
# @param domain [String] The normalized domain that was processed
|
|
43
|
+
#
|
|
44
|
+
# @param screenshot [String] Public URL of the uploaded screenshot image
|
|
45
|
+
#
|
|
46
|
+
# @param screenshot_type [Symbol, ContextDev::Models::BrandScreenshotResponse::ScreenshotType] Type of screenshot that was captured
|
|
47
|
+
#
|
|
48
|
+
# @param status [String] Status of the response, e.g., 'ok'
|
|
49
|
+
|
|
50
|
+
# Type of screenshot that was captured
|
|
51
|
+
#
|
|
52
|
+
# @see ContextDev::Models::BrandScreenshotResponse#screenshot_type
|
|
53
|
+
module ScreenshotType
|
|
54
|
+
extend ContextDev::Internal::Type::Enum
|
|
55
|
+
|
|
56
|
+
VIEWPORT = :viewport
|
|
57
|
+
FULL_PAGE = :fullPage
|
|
58
|
+
|
|
59
|
+
# @!method self.values
|
|
60
|
+
# @return [Array<Symbol>]
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Models
|
|
5
|
+
# @see ContextDev::Resources::Brand#styleguide
|
|
6
|
+
class BrandStyleguideParams < ContextDev::Internal::Type::BaseModel
|
|
7
|
+
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include ContextDev::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute direct_url
|
|
11
|
+
# A specific URL to fetch the styleguide from directly, bypassing domain
|
|
12
|
+
# resolution (e.g., 'https://example.com/design-system').
|
|
13
|
+
#
|
|
14
|
+
# @return [String, nil]
|
|
15
|
+
optional :direct_url, String
|
|
16
|
+
|
|
17
|
+
# @!attribute domain
|
|
18
|
+
# Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
|
|
19
|
+
# domain will be automatically normalized and validated.
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :domain, String
|
|
23
|
+
|
|
24
|
+
# @!attribute prioritize
|
|
25
|
+
# Optional parameter to prioritize screenshot capture for styleguide extraction.
|
|
26
|
+
# If 'speed', optimizes for faster capture with basic quality. If 'quality',
|
|
27
|
+
# optimizes for higher quality with longer wait times. Defaults to 'quality' if
|
|
28
|
+
# not provided.
|
|
29
|
+
#
|
|
30
|
+
# @return [Symbol, ContextDev::Models::BrandStyleguideParams::Prioritize, nil]
|
|
31
|
+
optional :prioritize, enum: -> { ContextDev::BrandStyleguideParams::Prioritize }
|
|
32
|
+
|
|
33
|
+
# @!attribute timeout_ms
|
|
34
|
+
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
35
|
+
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
36
|
+
# value is 300000ms (5 minutes).
|
|
37
|
+
#
|
|
38
|
+
# @return [Integer, nil]
|
|
39
|
+
optional :timeout_ms, Integer
|
|
40
|
+
|
|
41
|
+
# @!method initialize(direct_url: nil, domain: nil, prioritize: nil, timeout_ms: nil, request_options: {})
|
|
42
|
+
# Some parameter documentations has been truncated, see
|
|
43
|
+
# {ContextDev::Models::BrandStyleguideParams} for more details.
|
|
44
|
+
#
|
|
45
|
+
# @param direct_url [String] A specific URL to fetch the styleguide from directly, bypassing domain resolutio
|
|
46
|
+
#
|
|
47
|
+
# @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
|
|
48
|
+
#
|
|
49
|
+
# @param prioritize [Symbol, ContextDev::Models::BrandStyleguideParams::Prioritize] Optional parameter to prioritize screenshot capture for styleguide extraction. I
|
|
50
|
+
#
|
|
51
|
+
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
52
|
+
#
|
|
53
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
54
|
+
|
|
55
|
+
# Optional parameter to prioritize screenshot capture for styleguide extraction.
|
|
56
|
+
# If 'speed', optimizes for faster capture with basic quality. If 'quality',
|
|
57
|
+
# optimizes for higher quality with longer wait times. Defaults to 'quality' if
|
|
58
|
+
# not provided.
|
|
59
|
+
module Prioritize
|
|
60
|
+
extend ContextDev::Internal::Type::Enum
|
|
61
|
+
|
|
62
|
+
SPEED = :speed
|
|
63
|
+
QUALITY = :quality
|
|
64
|
+
|
|
65
|
+
# @!method self.values
|
|
66
|
+
# @return [Array<Symbol>]
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|