berrycrawl 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e72ddcb7e1f231189749c045fa62223de12c715a8f767c163e84d0856df40be
4
- data.tar.gz: c5d667b602860e6fa52c360d019b177f037e0befb123bb4286390864ea5d7ebb
3
+ metadata.gz: ff033890f0609859b655c97db2e9995726eac6da14e8e67d5ad5db3a341bc5aa
4
+ data.tar.gz: 5c6b71e06970f5a72e0a44d26ebd89f87b1d972e95d9be7d29712f0869b0ca28
5
5
  SHA512:
6
- metadata.gz: 0bbb2bf3a70a0a9fb447c080ee59dbbf36f5fffd17ca66ddf3ed69ddb9310c8455034692885901dc1df5daa0c42dd19491b7990dec1842f9f0d03f244377232f
7
- data.tar.gz: d7ae3f5ea207dfba87d1cb532ef32a12edcfb8162db22688e738baf5db67b22e523baa1ccf2fce906c77488b8cf3028902c044964a8bd06f99be0e399c11c0fd
6
+ metadata.gz: 6000645f7d432db6f9939145e1ff77ecb16ae331cdab2c4e4c7effec89c7c3011185e172830edce71b73859a36194671cec9c7aa00139fd689045077ba87f09b
7
+ data.tar.gz: a2d4293cf44ee79e880e82e67a99443f39bfc9d2e43d5bd08ff0b2aca3c14869ad51b6775353611ae8465e63377271b576327fd57da0f5eaf770e9e609e4256e
data/.fern/metadata.json CHANGED
@@ -5,8 +5,9 @@
5
5
  "generatorConfig": {
6
6
  "moduleName": "Berrycrawl"
7
7
  },
8
- "originGitCommit": "a392c48ac4c6239a0801aa8866d9ad06f5f10496",
9
- "originGitCommitIsDirty": true,
10
- "invokedBy": "manual",
11
- "requestedVersion": "0.1.0"
8
+ "originGitCommit": "70780c2043f50f399329b003aaf2dbac2584d072",
9
+ "originGitCommitIsDirty": false,
10
+ "invokedBy": "ci",
11
+ "requestedVersion": "0.2.0",
12
+ "ciProvider": "github"
12
13
  }
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  The official Ruby SDK for scraping, crawling, searching, mapping, structured extraction, screenshots, and brand profiles.
5
5
 
6
- [Documentation](https://docs.berrycrawl.com) · [Dashboard](https://app.berrycrawl.com) · [GitHub](https://github.com/strawberry-labs/berrycrawl-ruby)
6
+ [Documentation](https://docs.berrycrawl.com) · [Dashboard](https://berrycrawl.com/app) · [GitHub](https://github.com/strawberry-labs/berrycrawl-ruby)
7
7
 
8
8
  ## Table of Contents
9
9
 
@@ -24,7 +24,7 @@ A full reference for this library is available [here](./reference.md).
24
24
 
25
25
  ## Usage
26
26
 
27
- Set `BERRYCRAWL_API_KEY` to an API key from the [Berrycrawl dashboard](https://app.berrycrawl.com).
27
+ Set `BERRYCRAWL_API_KEY` to an API key from the [Berrycrawl dashboard](https://berrycrawl.com/app).
28
28
 
29
29
  ```ruby
30
30
  require "berrycrawl"
@@ -49,6 +49,10 @@ brand = client.brand.retrieve(url: "https://stripe.com")
49
49
  puts brand.data
50
50
  ```
51
51
 
52
+ ### Brand design system
53
+
54
+ Brand responses include an optional `branding` object for compatibility with older API deployments. When available, it contains the rendered light/dark scheme, semantic colors, typography, spacing, representative input and button styles, and semantic image roles. Use `branding.images.favicon` for the square icon and `branding.images.logo` for the wordmark.
55
+
52
56
  ## Environments
53
57
 
54
58
  This SDK allows you to configure different environments or custom URLs for API requests. You can either use the predefined environments or specify your own custom URL.
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Berrycrawl
4
+ module Types
5
+ class BrandComponentStyle < Internal::Types::Model
6
+ field :background, -> { String }, optional: true, nullable: false
7
+
8
+ field :border_color, -> { String }, optional: true, nullable: false, api_name: "borderColor"
9
+
10
+ field :border_radius, -> { String }, optional: true, nullable: false, api_name: "borderRadius"
11
+
12
+ field :shadow, -> { String }, optional: true, nullable: false
13
+
14
+ field :text_color, -> { String }, optional: true, nullable: false, api_name: "textColor"
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Berrycrawl
4
+ module Types
5
+ class BrandDesignSystem < Internal::Types::Model
6
+ field :colors, -> { Berrycrawl::Types::BrandDesignSystemColors }, optional: false, nullable: false
7
+
8
+ field :color_scheme, -> { Berrycrawl::Types::BrandDesignSystemColorScheme }, optional: false, nullable: false, api_name: "colorScheme"
9
+
10
+ field :components, -> { Berrycrawl::Types::BrandDesignSystemComponents }, optional: false, nullable: false
11
+
12
+ field :images, -> { Berrycrawl::Types::BrandDesignSystemImages }, optional: false, nullable: false
13
+
14
+ field :spacing, -> { Berrycrawl::Types::BrandDesignSystemSpacing }, optional: false, nullable: false
15
+
16
+ field :typography, -> { Berrycrawl::Types::BrandDesignSystemTypography }, optional: false, nullable: false
17
+ end
18
+ end
19
+ end
@@ -2,10 +2,11 @@
2
2
 
3
3
  module Berrycrawl
4
4
  module Types
5
- module SearchResponseProvider
5
+ module BrandDesignSystemColorScheme
6
6
  extend Berrycrawl::Internal::Types::Enum
7
7
 
8
- PARALLEL = "parallel"
8
+ LIGHT = "light"
9
+ DARK = "dark"
9
10
  end
10
11
  end
11
12
  end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Berrycrawl
4
+ module Types
5
+ class BrandDesignSystemColors < Internal::Types::Model
6
+ field :accent, -> { String }, optional: true, nullable: false
7
+
8
+ field :background, -> { String }, optional: true, nullable: false
9
+
10
+ field :link, -> { String }, optional: true, nullable: false
11
+
12
+ field :primary, -> { String }, optional: true, nullable: false
13
+
14
+ field :secondary, -> { String }, optional: true, nullable: false
15
+
16
+ field :text_primary, -> { String }, optional: true, nullable: false, api_name: "textPrimary"
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Berrycrawl
4
+ module Types
5
+ class BrandDesignSystemComponents < Internal::Types::Model
6
+ field :button_primary, -> { Berrycrawl::Types::BrandComponentStyle }, optional: true, nullable: false, api_name: "buttonPrimary"
7
+
8
+ field :button_secondary, -> { Berrycrawl::Types::BrandComponentStyle }, optional: true, nullable: false, api_name: "buttonSecondary"
9
+
10
+ field :input, -> { Berrycrawl::Types::BrandComponentStyle }, optional: true, nullable: false
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Berrycrawl
4
+ module Types
5
+ class BrandDesignSystemImages < Internal::Types::Model
6
+ field :favicon, -> { String }, optional: true, nullable: false
7
+
8
+ field :logo, -> { String }, optional: true, nullable: false
9
+
10
+ field :og_image, -> { String }, optional: true, nullable: false, api_name: "ogImage"
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Berrycrawl
4
+ module Types
5
+ class BrandDesignSystemSpacing < Internal::Types::Model
6
+ field :base_unit, -> { Integer }, optional: false, nullable: false, api_name: "baseUnit"
7
+
8
+ field :border_radius, -> { String }, optional: true, nullable: false, api_name: "borderRadius"
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Berrycrawl
4
+ module Types
5
+ class BrandDesignSystemTypography < Internal::Types::Model
6
+ field :font_families, -> { Berrycrawl::Types::BrandDesignSystemTypographyFontFamilies }, optional: false, nullable: false, api_name: "fontFamilies"
7
+
8
+ field :font_sizes, -> { Berrycrawl::Types::BrandDesignSystemTypographyFontSizes }, optional: false, nullable: false, api_name: "fontSizes"
9
+
10
+ field :font_stacks, -> { Berrycrawl::Types::BrandDesignSystemTypographyFontStacks }, optional: false, nullable: false, api_name: "fontStacks"
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Berrycrawl
4
+ module Types
5
+ class BrandDesignSystemTypographyFontFamilies < Internal::Types::Model
6
+ field :heading, -> { String }, optional: true, nullable: false
7
+
8
+ field :primary, -> { String }, optional: true, nullable: false
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Berrycrawl
4
+ module Types
5
+ class BrandDesignSystemTypographyFontSizes < Internal::Types::Model
6
+ field :body, -> { String }, optional: true, nullable: false
7
+
8
+ field :h1, -> { String }, optional: true, nullable: false
9
+
10
+ field :h2, -> { String }, optional: true, nullable: false
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Berrycrawl
4
+ module Types
5
+ class BrandDesignSystemTypographyFontStacks < Internal::Types::Model
6
+ field :body, -> { Internal::Types::Array[String] }, optional: false, nullable: false
7
+
8
+ field :heading, -> { Internal::Types::Array[String] }, optional: false, nullable: false
9
+
10
+ field :paragraph, -> { Internal::Types::Array[String] }, optional: false, nullable: false
11
+ end
12
+ end
13
+ end
@@ -3,6 +3,8 @@
3
3
  module Berrycrawl
4
4
  module Types
5
5
  class BrandProfile < Internal::Types::Model
6
+ field :branding, -> { Berrycrawl::Types::BrandDesignSystem }, optional: true, nullable: false
7
+
6
8
  field :colors, -> { Internal::Types::Array[Berrycrawl::Types::BrandProfileColorsItem] }, optional: false, nullable: false
7
9
 
8
10
  field :description, -> { String }, optional: true, nullable: false
@@ -7,8 +7,6 @@ module Berrycrawl
7
7
 
8
8
  field :data, -> { Internal::Types::Array[Berrycrawl::Types::SearchResult] }, optional: false, nullable: false
9
9
 
10
- field :provider, -> { Berrycrawl::Types::SearchResponseProvider }, optional: false, nullable: false
11
-
12
10
  field :query, -> { String }, optional: false, nullable: false
13
11
 
14
12
  field :success, -> { Internal::Types::Boolean }, optional: false, nullable: false
@@ -3,8 +3,6 @@
3
3
  module Berrycrawl
4
4
  module Types
5
5
  class SearchResult < Internal::Types::Model
6
- field :provider, -> { Berrycrawl::Types::SearchResultProvider }, optional: true, nullable: false
7
-
8
6
  field :published_date, -> { String }, optional: true, nullable: false, api_name: "publishedDate"
9
7
 
10
8
  field :snippet, -> { String }, optional: false, nullable: false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Berrycrawl
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
data/lib/Berrycrawl.rb CHANGED
@@ -66,6 +66,17 @@ require_relative "Berrycrawl/types/action_dto"
66
66
  require_relative "Berrycrawl/types/agent_config_dto_mode"
67
67
  require_relative "Berrycrawl/types/agent_config_dto"
68
68
  require_relative "Berrycrawl/types/brand_asset"
69
+ require_relative "Berrycrawl/types/brand_component_style"
70
+ require_relative "Berrycrawl/types/brand_design_system_colors"
71
+ require_relative "Berrycrawl/types/brand_design_system_color_scheme"
72
+ require_relative "Berrycrawl/types/brand_design_system_components"
73
+ require_relative "Berrycrawl/types/brand_design_system_images"
74
+ require_relative "Berrycrawl/types/brand_design_system_spacing"
75
+ require_relative "Berrycrawl/types/brand_design_system_typography_font_families"
76
+ require_relative "Berrycrawl/types/brand_design_system_typography_font_sizes"
77
+ require_relative "Berrycrawl/types/brand_design_system_typography_font_stacks"
78
+ require_relative "Berrycrawl/types/brand_design_system_typography"
79
+ require_relative "Berrycrawl/types/brand_design_system"
69
80
  require_relative "Berrycrawl/types/brand_profile_colors_item"
70
81
  require_relative "Berrycrawl/types/brand_profile_fonts_item"
71
82
  require_relative "Berrycrawl/types/brand_profile_socials_item"
@@ -99,8 +110,6 @@ require_relative "Berrycrawl/types/screenshot_cookie_dto_same_site"
99
110
  require_relative "Berrycrawl/types/screenshot_cookie_dto"
100
111
  require_relative "Berrycrawl/types/screenshot_location_dto"
101
112
  require_relative "Berrycrawl/types/screenshot_viewport_dto"
102
- require_relative "Berrycrawl/types/search_response_provider"
103
- require_relative "Berrycrawl/types/search_result_provider"
104
113
  require_relative "Berrycrawl/types/search_result"
105
114
  require_relative "Berrycrawl/types/search_response"
106
115
  require_relative "Berrycrawl/types/test_webhook_response"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: berrycrawl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Strawberry Labs LLC
@@ -77,6 +77,17 @@ files:
77
77
  - lib/Berrycrawl/types/agent_config_dto.rb
78
78
  - lib/Berrycrawl/types/agent_config_dto_mode.rb
79
79
  - lib/Berrycrawl/types/brand_asset.rb
80
+ - lib/Berrycrawl/types/brand_component_style.rb
81
+ - lib/Berrycrawl/types/brand_design_system.rb
82
+ - lib/Berrycrawl/types/brand_design_system_color_scheme.rb
83
+ - lib/Berrycrawl/types/brand_design_system_colors.rb
84
+ - lib/Berrycrawl/types/brand_design_system_components.rb
85
+ - lib/Berrycrawl/types/brand_design_system_images.rb
86
+ - lib/Berrycrawl/types/brand_design_system_spacing.rb
87
+ - lib/Berrycrawl/types/brand_design_system_typography.rb
88
+ - lib/Berrycrawl/types/brand_design_system_typography_font_families.rb
89
+ - lib/Berrycrawl/types/brand_design_system_typography_font_sizes.rb
90
+ - lib/Berrycrawl/types/brand_design_system_typography_font_stacks.rb
80
91
  - lib/Berrycrawl/types/brand_profile.rb
81
92
  - lib/Berrycrawl/types/brand_profile_colors_item.rb
82
93
  - lib/Berrycrawl/types/brand_profile_fonts_item.rb
@@ -134,9 +145,7 @@ files:
134
145
  - lib/Berrycrawl/types/screenshot_viewport_dto.rb
135
146
  - lib/Berrycrawl/types/search_dto.rb
136
147
  - lib/Berrycrawl/types/search_response.rb
137
- - lib/Berrycrawl/types/search_response_provider.rb
138
148
  - lib/Berrycrawl/types/search_result.rb
139
- - lib/Berrycrawl/types/search_result_provider.rb
140
149
  - lib/Berrycrawl/types/summary_format_dto.rb
141
150
  - lib/Berrycrawl/types/summary_format_dto_type.rb
142
151
  - lib/Berrycrawl/types/test_webhook_response.rb
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Berrycrawl
4
- module Types
5
- module SearchResultProvider
6
- extend Berrycrawl::Internal::Types::Enum
7
-
8
- PARALLEL = "parallel"
9
- end
10
- end
11
- end