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 +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +35 -14
- data/lib/ebay/browse.rb +4 -0
- data/lib/ebay/configuration.rb +9 -1
- data/lib/ebay/finding.rb +12 -0
- data/lib/ebay/marketplace_insights.rb +9 -0
- data/lib/ebay/version.rb +1 -1
- data/lib/ebay.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca9bfb12653bedb4b382524b74f64351f54090af81c77aa904ddf56bd79e3622
|
|
4
|
+
data.tar.gz: 689b373e5c06a0eacc4c208abcce936c1bc4133beaf33604a19d674a17df0211
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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,
|
|
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
|
-
###
|
|
78
|
+
### Marketplace Insights API
|
|
75
79
|
|
|
76
|
-
Search
|
|
80
|
+
Search sold/completed items for price history and market data.
|
|
77
81
|
|
|
78
82
|
```ruby
|
|
79
|
-
|
|
83
|
+
insights = Ebay::MarketplaceInsights.new
|
|
80
84
|
|
|
81
|
-
# Search
|
|
82
|
-
|
|
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
|
-
#
|
|
85
|
-
sold =
|
|
91
|
+
# With filters
|
|
92
|
+
sold = insights.search(q: "vintage rolex", category_ids: "31387", limit: 20)
|
|
93
|
+
```
|
|
86
94
|
|
|
87
|
-
|
|
88
|
-
results = finding.find_items_advanced(keywords: "nike jordan", categoryId: "93427")
|
|
95
|
+
### Finding API (Deprecated)
|
|
89
96
|
|
|
90
|
-
|
|
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
|
data/lib/ebay/configuration.rb
CHANGED
|
@@ -2,8 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
module Ebay
|
|
4
4
|
class Configuration
|
|
5
|
-
attr_accessor :client_id, :client_secret,
|
|
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
|
|
data/lib/ebay/version.rb
CHANGED
data/lib/ebay.rb
CHANGED
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.
|
|
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
|