ebay-api-ruby 0.1.1 → 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: 5b23fa2381e44c43e7d349a5d214f382385c78589f146474a973e83f5856374c
4
- data.tar.gz: 03134117bb7a380db73b022cfe61a0dd0d8b92b46cc9aaa02b3d2b5aeb944969
3
+ metadata.gz: ca9bfb12653bedb4b382524b74f64351f54090af81c77aa904ddf56bd79e3622
4
+ data.tar.gz: 689b373e5c06a0eacc4c208abcce936c1bc4133beaf33604a19d674a17df0211
5
5
  SHA512:
6
- metadata.gz: 0bdbd6383759a9d35afcad66b261e5ac619b2db715a6ba9d617cc3c096869820e10249a1de30559065590360e27e30200e1590fa56261429ace3b0a1933a00c6
7
- data.tar.gz: 75ddb7fffeef6a2ee863d0a91a09a414074527d0dcd5fef4525b6911f8cbac8ab810b0fa922136f0fde3e7ebaacab9305bea91e6a45774514241ba0a3d622615
6
+ metadata.gz: 143f878b8ef05a3b51198a44aae4cc3a74b2457efbecca5fd36c97e19cc86cb06efa2f894f178675d32427ce69d513d827566de310bea150d95ae596a761f4e8
7
+ data.tar.gz: 556411ffe901a48604126121fa21c5dcf1f10797b3edc10833286c9fd3d0350308055821a2d3043a72d5c879a20ece5890b064ff356ae82a27534f275f41703a
data/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.2.0] - 2026-03-26
6
+
7
+ ### Added
8
+
9
+ - Marketplace Insights API: `Ebay::MarketplaceInsights#search` for sold/completed item data
10
+ - Browse API: `Ebay::Browse#search_by_category` for category-only searches
11
+
12
+ ### Deprecated
13
+
14
+ - Finding API: all methods deprecated — eBay has shut down the Finding Service
15
+ - `find_items_by_keywords` → use `Ebay::Browse#search`
16
+ - `find_completed_items` → use `Ebay::MarketplaceInsights#search`
17
+ - `find_items_by_category` → use `Ebay::Browse#search_by_category`
18
+ - `find_items_advanced` → use `Ebay::Browse#search`
19
+ - Configuration: `app_id` is deprecated (OAuth 2.0 only going forward)
20
+
5
21
  ## [0.1.0] - 2026-03-26
6
22
 
7
23
  ### Added
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # ebay-api-ruby
2
2
 
3
- A modern Ruby gem for the eBay REST APIs. Supports the Browse API, Finding API, and Taxonomy API with OAuth 2.0 authentication.
3
+ A modern Ruby gem for the eBay REST APIs. Supports the Browse API, Marketplace Insights API, and Taxonomy API with OAuth 2.0 authentication.
4
+
5
+ > **Deprecation Notice:** The eBay Finding API has been shut down. All `Ebay::Finding` methods now emit deprecation warnings and will be removed in v1.0.0. See [Migration Guide](#migrating-from-the-finding-api) below.
4
6
 
5
7
  ## Installation
6
8
 
@@ -30,7 +32,6 @@ require 'ebay'
30
32
  Ebay.configure do |config|
31
33
  config.client_id = ENV['EBAY_CLIENT_ID']
32
34
  config.client_secret = ENV['EBAY_CLIENT_SECRET']
33
- config.app_id = ENV['EBAY_APP_ID'] # Optional, defaults to client_id for Finding API
34
35
  config.marketplace_id = 'EBAY_US' # Default
35
36
  config.timeout = 30 # Default
36
37
  end
@@ -67,29 +68,33 @@ item = browse.get_item("v1|123456789|0")
67
68
  # Get items by group
68
69
  items = browse.get_items_by_item_group("group123")
69
70
 
71
+ # Search by category (no keywords required)
72
+ results = browse.search_by_category("9355", limit: 10)
73
+
70
74
  # Search by image
71
75
  results = browse.search_by_image(Base64.encode64(File.read("watch.jpg")))
72
76
  ```
73
77
 
74
- ### Finding API
78
+ ### Marketplace Insights API
75
79
 
76
- Search active and completed/sold listings. Uses the legacy Finding Service (no OAuth required, just app_id).
80
+ Search sold/completed items for price history and market data.
77
81
 
78
82
  ```ruby
79
- finding = Ebay::Finding.new
83
+ insights = Ebay::MarketplaceInsights.new
80
84
 
81
- # Search by keywords
82
- results = finding.find_items_by_keywords("macbook pro m3")
85
+ # Search sold items
86
+ sold = insights.search(q: "pokemon base set charizard")
87
+ sold['itemSales'].each do |item|
88
+ puts "#{item['title']} - sold for #{item['lastSoldPrice']['value']}"
89
+ end
83
90
 
84
- # Find completed/sold items (great for price history)
85
- sold = finding.find_completed_items("pokemon base set charizard")
91
+ # With filters
92
+ sold = insights.search(q: "vintage rolex", category_ids: "31387", limit: 20)
93
+ ```
86
94
 
87
- # Advanced search with filters
88
- results = finding.find_items_advanced(keywords: "nike jordan", categoryId: "93427")
95
+ ### Finding API (Deprecated)
89
96
 
90
- # Search by category
91
- results = finding.find_items_by_category("9355")
92
- ```
97
+ > **The Finding API has been shut down by eBay.** All methods emit deprecation warnings. Use Browse and Marketplace Insights APIs instead. See [Migration Guide](#migrating-from-the-finding-api).
93
98
 
94
99
  ### Taxonomy API
95
100
 
@@ -144,6 +149,22 @@ rescue Ebay::ConfigurationError => e
144
149
  end
145
150
  ```
146
151
 
152
+ ## Migrating from the Finding API
153
+
154
+ The eBay Finding API has been shut down. Here's how to migrate to the replacement APIs:
155
+
156
+ | Finding (old) | Replacement (new) |
157
+ |---|---|
158
+ | `finding.find_items_by_keywords("query")` | `browse.search(q: "query")` |
159
+ | `finding.find_completed_items("query")` | `insights.search(q: "query")` |
160
+ | `finding.find_items_by_category("9355")` | `browse.search_by_category("9355")` |
161
+ | `finding.find_items_advanced(keywords: "q", categoryId: "9355")` | `browse.search(q: "q", category_ids: "9355")` |
162
+
163
+ **Key differences:**
164
+ - **Auth:** No more `app_id` — all APIs use OAuth 2.0 (`client_id` + `client_secret`)
165
+ - **Response format:** Clean REST JSON instead of the old nested XML-style format
166
+ - **Filters:** Browse API uses a `filter` parameter (e.g., `filter: "price:[10..50],priceCurrency:USD"`) instead of Finding's `itemFilter` syntax
167
+
147
168
  ## Development
148
169
 
149
170
  ```bash
data/lib/ebay/browse.rb CHANGED
@@ -16,6 +16,10 @@ module Ebay
16
16
  client.get("/buy/browse/v1/item/get_items_by_item_group", item_group_id: item_group_id)
17
17
  end
18
18
 
19
+ def search_by_category(category_ids, **params)
20
+ client.get("/buy/browse/v1/item_summary/search", { category_ids: category_ids }.merge(params))
21
+ end
22
+
19
23
  def search_by_image(image_base64, **params)
20
24
  client.post("/buy/browse/v1/item_summary/search_by_image", { image: image_base64 }.merge(params))
21
25
  end
@@ -2,8 +2,15 @@
2
2
 
3
3
  module Ebay
4
4
  class Configuration
5
- attr_accessor :client_id, :client_secret, :app_id,
5
+ attr_accessor :client_id, :client_secret,
6
6
  :base_url, :sandbox, :timeout, :marketplace_id
7
+ attr_reader :app_id
8
+
9
+ def app_id=(value)
10
+ warn "[DEPRECATION] app_id is deprecated. The Finding API has been shut down by eBay. " \
11
+ "Use client_id and client_secret with OAuth 2.0 instead (Browse and Marketplace Insights APIs)."
12
+ @app_id = value
13
+ end
7
14
 
8
15
  def initialize
9
16
  @base_url = "https://api.ebay.com"
@@ -24,6 +31,7 @@ module Ebay
24
31
  end
25
32
 
26
33
  def finding_url
34
+ warn "[DEPRECATION] finding_url is deprecated. The Finding API has been shut down by eBay."
27
35
  sandbox ? "https://svcs.sandbox.ebay.com/services/search/FindingService/v1" : "https://svcs.ebay.com/services/search/FindingService/v1"
28
36
  end
29
37
  end
data/lib/ebay/finding.rb CHANGED
@@ -3,18 +3,30 @@
3
3
  module Ebay
4
4
  class Finding < Base
5
5
  def find_items_by_keywords(keywords, **params)
6
+ warn "[DEPRECATION] Ebay::Finding#find_items_by_keywords is deprecated. " \
7
+ "Use Ebay::Browse#search(q: keywords) instead. " \
8
+ "The Finding API has been shut down by eBay."
6
9
  finding_request("findItemsByKeywords", { keywords: keywords }.merge(params))
7
10
  end
8
11
 
9
12
  def find_completed_items(keywords, **params)
13
+ warn "[DEPRECATION] Ebay::Finding#find_completed_items is deprecated. " \
14
+ "Use Ebay::MarketplaceInsights#search(q: keywords) instead. " \
15
+ "The Finding API has been shut down by eBay."
10
16
  finding_request("findCompletedItems", { keywords: keywords }.merge(params))
11
17
  end
12
18
 
13
19
  def find_items_advanced(**params)
20
+ warn "[DEPRECATION] Ebay::Finding#find_items_advanced is deprecated. " \
21
+ "Use Ebay::Browse#search(q:, category_ids:, ...) instead. " \
22
+ "The Finding API has been shut down by eBay."
14
23
  finding_request("findItemsAdvanced", params)
15
24
  end
16
25
 
17
26
  def find_items_by_category(category_id, **params)
27
+ warn "[DEPRECATION] Ebay::Finding#find_items_by_category is deprecated. " \
28
+ "Use Ebay::Browse#search_by_category(category_ids) instead. " \
29
+ "The Finding API has been shut down by eBay."
18
30
  finding_request("findItemsByCategory", { categoryId: category_id }.merge(params))
19
31
  end
20
32
 
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Ebay
4
+ class MarketplaceInsights < Base
5
+ def search(q:, **params)
6
+ client.get("/buy/marketplace_insights/v1_beta/item_sales/search", { q: q }.merge(params))
7
+ end
8
+ end
9
+ end
data/lib/ebay/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ebay
4
- VERSION = "0.1.1"
4
+ VERSION = "0.2.0"
5
5
  end
data/lib/ebay.rb CHANGED
@@ -11,6 +11,7 @@ require_relative 'ebay/client'
11
11
  require_relative 'ebay/base'
12
12
  require_relative 'ebay/browse'
13
13
  require_relative 'ebay/finding'
14
+ require_relative 'ebay/marketplace_insights'
14
15
  require_relative 'ebay/taxonomy'
15
16
 
16
17
  module Ebay
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebay-api-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Souza
@@ -154,6 +154,7 @@ files:
154
154
  - lib/ebay/configuration.rb
155
155
  - lib/ebay/errors.rb
156
156
  - lib/ebay/finding.rb
157
+ - lib/ebay/marketplace_insights.rb
157
158
  - lib/ebay/taxonomy.rb
158
159
  - lib/ebay/version.rb
159
160
  homepage: https://github.com/esouza/ebay-api-ruby