Class: Ebay::Finding
- Inherits:
-
Object
- Object
- Ebay::Finding
- Includes:
- Sandboxable
- Defined in:
- lib/ebay/finding.rb
Overview
The Finding API lets you search for and browse items listed on eBay and provides useful metadata to refine searches.
Constant Summary collapse
- SANDBOX_ENDPOINT =
'https://svcs.sandbox.ebay.com/services/search/FindingService/v1'- PRODUCTION_ENDPOINT =
'https://svcs.ebay.com/services/search/FindingService/v1'
Instance Attribute Summary collapse
- #global_id ⇒ String? readonly
- #message_encoding ⇒ String? readonly
- #response_data_format ⇒ String? readonly
- #security_appname ⇒ String readonly
- #service_version ⇒ String? readonly
Attributes included from Sandboxable
Instance Method Summary collapse
-
#find_completed_items(payload = {}) ⇒ HTTP::Response
Searches for items whose listings are completed.
-
#find_items_advanced(payload = {}) ⇒ HTTP::Response
Searches for items by category or keyword or both.
-
#find_items_by_category(payload = {}) ⇒ HTTP::Response
Searches for items using specific eBay category ID numbers.
-
#find_items_by_keywords(keywords, payload = {}) ⇒ HTTP::Response
Searches for items by a keyword query.
-
#find_items_by_product(product_id, product_id_type, payload = {}) ⇒ HTTP::Response
Searches for items using specific eBay product values.
-
#find_items_in_ebay_stores(payload = {}) ⇒ HTTP::Response
Searches for items in the eBay store inventories.
-
#get_histograms(category_id) ⇒ HTTP::Response
Retrieves category and/or aspect histogram information for an eBay category.
-
#get_search_keywords_recommendation(keywords) ⇒ HTTP::Response
Retrieves commonly used words found in eBay titles, based on the words you supply.
-
#get_version ⇒ HTTP::Response
Returns the current version of the service.
-
#initialize(global_id: nil, message_encoding: nil, response_data_format: 'JSON', security_appname: Config.app_id, service_version: nil) ⇒ Finding
constructor
Returns a Finding API request instance.
Methods included from Sandboxable
Constructor Details
#initialize(global_id: nil, message_encoding: nil, response_data_format: 'JSON', security_appname: Config.app_id, service_version: nil) ⇒ Finding
Returns a Finding API request instance
43 44 45 46 47 48 49 50 51 |
# File 'lib/ebay/finding.rb', line 43 def initialize(global_id: nil, message_encoding: nil, response_data_format: 'JSON', security_appname: Config.app_id, service_version: nil) @global_id = global_id @message_encoding = @response_data_format = response_data_format @security_appname = security_appname @service_version = service_version end |
Instance Attribute Details
#global_id ⇒ String? (readonly)
21 22 23 |
# File 'lib/ebay/finding.rb', line 21 def global_id @global_id end |
#message_encoding ⇒ String? (readonly)
24 25 26 |
# File 'lib/ebay/finding.rb', line 24 def @message_encoding end |
#response_data_format ⇒ String? (readonly)
27 28 29 |
# File 'lib/ebay/finding.rb', line 27 def response_data_format @response_data_format end |
#security_appname ⇒ String (readonly)
30 31 32 |
# File 'lib/ebay/finding.rb', line 30 def security_appname @security_appname end |
#service_version ⇒ String? (readonly)
33 34 35 |
# File 'lib/ebay/finding.rb', line 33 def service_version @service_version end |
Instance Method Details
#find_completed_items(payload = {}) ⇒ HTTP::Response
Searches for items whose listings are completed
57 58 59 |
# File 'lib/ebay/finding.rb', line 57 def find_completed_items(payload = {}) request('findCompletedItems', payload) end |
#find_items_advanced(payload = {}) ⇒ HTTP::Response
Searches for items by category or keyword or both
65 66 67 |
# File 'lib/ebay/finding.rb', line 65 def find_items_advanced(payload = {}) request('findItemsAdvanced', payload) end |
#find_items_by_category(payload = {}) ⇒ HTTP::Response
Searches for items using specific eBay category ID numbers
73 74 75 |
# File 'lib/ebay/finding.rb', line 73 def find_items_by_category(payload = {}) request('findItemsByCategory', payload) end |
#find_items_by_keywords(keywords, payload = {}) ⇒ HTTP::Response
Searches for items by a keyword query
82 83 84 85 |
# File 'lib/ebay/finding.rb', line 82 def find_items_by_keywords(keywords, payload = {}) payload.update('keywords' => keywords) request('findItemsByKeywords', payload) end |
#find_items_by_product(product_id, product_id_type, payload = {}) ⇒ HTTP::Response
Searches for items using specific eBay product values\
93 94 95 96 97 98 |
# File 'lib/ebay/finding.rb', line 93 def find_items_by_product(product_id, product_id_type, payload = {}) payload.update('productId' => product_id, 'productId.@type' => product_id_type) request('findItemsByProduct', payload) end |
#find_items_in_ebay_stores(payload = {}) ⇒ HTTP::Response
Searches for items in the eBay store inventories
104 105 106 |
# File 'lib/ebay/finding.rb', line 104 def find_items_in_ebay_stores(payload = {}) request('findItemsIneBayStores', payload) end |
#get_histograms(category_id) ⇒ HTTP::Response
Retrieves category and/or aspect histogram information for an eBay category
113 114 115 |
# File 'lib/ebay/finding.rb', line 113 def get_histograms(category_id) request('getHistograms', 'categoryId' => category_id) end |
#get_search_keywords_recommendation(keywords) ⇒ HTTP::Response
Retrieves commonly used words found in eBay titles, based on the words you supply
122 123 124 |
# File 'lib/ebay/finding.rb', line 122 def get_search_keywords_recommendation(keywords) request('getSearchKeywordsRecommendation', 'keywords' => keywords) end |
#get_version ⇒ HTTP::Response
Returns the current version of the service
129 130 131 |
# File 'lib/ebay/finding.rb', line 129 def get_version request('getVersion') end |