kayoom / ebay_client Goto Github PK
View Code? Open in Web Editor NEWLightweight eBay Trading API Client
License: Other
Lightweight eBay Trading API Client
License: Other
Hi,
Sorry but is there a suggested way to override the development mode to load api.ebay.com URL instead of sandbox.ebay.com ?
I tried to create a new module but it did not work. Apparently SOAP requests are breaking. I can rebundle the gem by changing the defaults.yml file but I don't think that's the right approach.
development: &development
<<: *defaults
url: 'https://api.ebay.com/wsapi'
warning_level: High
savon_log_level: :debug
There might be an obvious solution to this, but for the life of me I can't see it. Trying to test my sinatra app against ebay sandbox, but I can't get it to send calls to the sandbox server.
I'm using eBay API for the first time and have no clue how to make calls. Please add some normal documentation, with examples like how to add fixed price item, how to create item type and so on. It will be very helpful. Right now i have a gem that i know does some stuff, but have no idea how to force it to do that stuff. Its very distracting and pissing me off. Please add some proper examples.
So first issue is when I put gem 'ebay_client", '~> 0.0.1' in my gem file and run bundle I get:
Could not find gem 'ebay_client (~> 0.0.1) ruby' in the gems available on this machine.
So I had to fork it and ref that one in my gemfile (Received another error about only having version 0.1.0 in my forked repo, so changed the version to that one).
So that's kind of fixed, not ideal though.
The second issue is after bundling my forked version, I manually create a new ebay_client.yml file in my config folder with the ebay supplied values in both dev and prod. When I run the rails c command you supplied in the readme: EbayClient.api.get_ebay_official_time
I get this error:
NoMethodError: undefined method 'appid' for nil:NilClass from /Users/my_user_name/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/ebay_client-39cea7ee3a90/lib/ebay_client/configuration.rb:32:in 'appid'
and it the trace continues...
I'm running Rails 3.2.13 & ruby 2.0.0p247
Any thoughts on how to fix this issue? Looks like it's getting the @current_keys from the key_values?
Hi! I got the following response from ebay:
{:complete_sale_response=>{:timestamp=>Tue, 30 Apr 2019 04:58:17 +0000, :ack=>"Failure", :errors=>[{:short_message=>"Not a seller for the item.", :long_message=>"The requestor is not the seller for the item.", :error_code=>"16210", :severity_code=>"Error", :error_classification=>"RequestError"}, nil], :version=>"1103", :build=>"E1103_INTL_APIXO_18954877_R1", :@xmlns=>"urn:ebay:apis:eBLBaseComponents"}}
As you can see, the errors array has 2 elements, an error and a nil
. I don't know why we got that, but it makes the client to brake at this point:
class EbayClient::Response
def get_errors(values)
values = [values] if values.is_a? Hash
values.map do |vals|
Error.new(vals) # <--- here
end
end
end
I think it can be solved by adding a compact
, what do you think?
class EbayClient::Response
def get_errors(values)
values = [values] if values.is_a? Hash
values.compact.map do |vals|
Error.new(vals) # safe to create an error
end
end
end
the example should be
EbayClient.api.get_ebay_official_time
and not
EbayClient.api.get_ebay_offical_time
Will save some frustration when starting to use the client
Hi,
Thanks for a great gem!
My only issue is that I would like to hide my eBay credentials and use environment variables instead and I'm having a hard time doing so...
This is what I would like to end up with:
development: &sandbox
api_keys:
- token: <%= ENV['EBAY_TOKEN'] %>
devid: <%= ENV['EBAY_DEVID'] %>
appid: <%= ENV['EBAY_APPID'] %>
certid: <%= ENV['EBAY_CERTID'] %>
test:
<<: *sandbox
production:
api_keys:
- token: <%= ENV['EBAY_TOKEN'] %>
devid: <%= ENV['EBAY_DEVID'] %>
appid: <%= ENV['EBAY_APPID'] %>
certid: <%= ENV['EBAY_CERTID'] %>
Any help would be appreciated.
Thank you!
One thing if you want to upgrade to rails 4 with this gem. Change the api.rb file from
"ActiveSupport::BasicObject" => "ActiveSupport::ProxyObject"
BasicObject is depricated
As you can see in the doc some tag needs attributes. For example, <Total currencyID="CurrencyCodeType"> AmountType (double) </Total>
.
When I do this :
EbayClient.api.add_order({ order: { creating_user_role: 'Buyer', total: 123 } })
I have this result :
#<EbayClient::Response:0x0000000c25b370
@ack="Failure",
@build="E949_CORE_API_17895653_R1",
@correlation_id=nil,
@errors=
[#<EbayClient::Response::Error:0x0000000c25b2f8
@classification="RequestError",
@code="10009",
@long_message="No <Order.Total.CurrencyID> exists or <Order.Total.CurrencyID> is specified as an empty tag in the request.",
@parameters={"0"=>"Order.Total.CurrencyID"},
@severity_code="Error",
@short_message="No <Order.Total.CurrencyID> exists or <Order.Total.CurrencyID> is specified as an empty tag.">,
#<EbayClient::Response::Error:0x0000000c25b230
@classification="RequestError",
@code="10009",
@long_message="No <Order.TransactionArray> exists or <Order.TransactionArray> is specified as an empty tag in the request.",
@parameters={"0"=>"Order.TransactionArray"},
@severity_code="Error",
@short_message="No <Order.TransactionArray> exists or <Order.TransactionArray> is specified as an empty tag.">],
@payload={:timestamp=>Mon, 04 Apr 2016 19:27:27 +0000},
@timestamp=Mon, 04 Apr 2016 19:27:27 +0000,
@version="949">
I have no clue by reading the doc. Is there a solution or is it not implemented yet.
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.