ccollins / rebay Goto Github PK
View Code? Open in Web Editor NEWRuby client for the RESTful JSON ebay finding and shopping api
License: MIT License
Ruby client for the RESTful JSON ebay finding and shopping api
License: MIT License
When configuring Rebay::Api in an initializer in a Rails 4.2 app, the sandbox boolean is not inherited by Rebay::Finding or Rebay::Shopping.
Workaround:
Rebay::Api.configure do |rebay|
rebay.app_id = "whatever"
rebay.sandbox = true
end
Rebay::Finding.configure do |rebay|
rebay.sandbox = true
end
Rebay::Shopping.configure do |rebay|
rebay.sandbox = true
end
It would be nice to have support for searching completed items under the findCompletedItems service (http://developer.ebay.com/DevZone/finding/CallRef/findCompletedItems.html). Example:
def find_completed_items(params)
raise ArgumentError unless params[:keywords] or params[:categoryId]
response = get_json_response(build_request_url('findCompletedItems', params))
response.trim(:findItemsAdvancedResponse)
if response.response.has_key?('searchResult') && response.response['searchResult'].has_key?('item')
response.results = response.response['searchResult']['item']
end
return response
end
Given:
finder = Rebay::Finding.new
response = finder.find_items_by_keywords(:keywords => query)
The response I'm getting (at least sometimes?):
{"ack"=>"Success", "version"=>"1.11.0", "timestamp"=>"2012-02-17T02:25:21.841Z"
The success? method only checks "Ack". Checking for both fixes the issue for me.
NoMethodError: undefined method `EBAY_US' for Rebay::Api:Class
after
shopping = Rebay::Shopping.new
shopping.get_category_info({:categoryId => '1'})
http endpoints on ebay api will be disabled end of march
I can see results info coming back from find_items_in_ebay_stores call but it doesn't handle pagination of the results. I can pass the pagination (page#) parameter but I get the same set (top 100 records) of data each time.
I need to be able to retrieve that other data (by pagenumber) and see the count info (totalPages and totalEntries)
in rebay / lib / rebay / finding.rb lines 57-58 you pull back only the 'items' array
It appears extra meta data is as follows (I see this after the 1st item record and before the next one (searchResult) )
Note: I changed data below where store to <>
"@count"=>"10
0"}, @response={"itemSearchURL"=>"http://stores.ebay.com/<>/_i.html?_fss=1&_saslop=1&LH_SpecificSeller=1&_ddo=1&_exm
aitems=1&_ipg=100&_pgn=1&_sid=1032732382&_ssn=<>", "ack"=>"Success", "paginationOutput"=>{"entriesPerPage"=>"10
0", "totalPages"=>"39", "totalEntries"=>"3826", "pageNumber"=>"1"}, "version"=>"1.12.0", "timestamp"=>"2012-10-0
9T05:16:31.558Z", "searchResult"=>{"item"
Code I'm using to call as follows:
response = finder.find_items_in_ebay_stores( {:storeName => '<>',
:pagination => {:entries_per_page => 100, :page_number => page_num}
}
)
I added an initliazer and set it with my application id.
When making a simple call:
finder = Rebay::Finding.new response = finder.get_search_keywords_recommendation({:keywords => 'acordian'})
I am getting the error:
#<Rebay::Response:0x102d39598 @response={"errorMessage"=>{"error"=>{"parameter"=>{"@name"=>"Param1", "__value__"=>"Invalid Application: xxxxxxx"}, "category"=>"System", "errorId"=>"11002", "domain"=>"Security", "subdomain"=>"Authentication", "severity"=>"Error", "message"=>"Authentication failed : Invalid Application: xxxxxxx"}}}>
(xxx is my app_id)
Little confused why I would be getting this? My app_id is setup correctly I would think. Does anything look wrong?
I just want to let you know that rebay drops that message with rails 3.
Avoid it should be as simple as remove the call.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.