Giter Site home page Giter Site logo

etsy's Introduction

Etcsv

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/etcsv. To experiment with that code, run bin/console for an interactive prompt.

TODO: Delete this and the text above, and describe your gem

Installation

Add this line to your application's Gemfile:

gem 'etcsv'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install etcsv

Usage

TODO: Write usage instructions here

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/etcsv. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Etcsv project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

etsy's People

Contributors

cardmagic avatar danielsz avatar fbehrens avatar iamfmjk avatar irosenb avatar iyerushalmi avatar jakeboxer avatar jimmytang avatar johnamican avatar julio avatar justinjruby avatar jwachira avatar kirillplatonov avatar kytrinyx avatar magni- avatar mason-stewart avatar mateus-resende avatar mattrayner avatar mfields106 avatar muon avatar paxer avatar plainlystated avatar pupca avatar reagent avatar rogsmith avatar sgerrand avatar sheprograms avatar trobrock avatar williamcodes avatar zhaoguoyuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

etsy's Issues

Change to the BillCharge findAllUserCharges call

https://groups.google.com/forum/?fromgroups#!topic/etsy-api-v2/MUx0MJhRvTU

Hi everyone,

To improve the response speed for API calls to BillCharge findAllUserCharges (/users/:user_id/charges) we are planning to alter the behaviour such that the min_created and max_created parameters become mandatory and can be no more than 31 days apart. If only one of these _created parameters is submitted in a request then the other will default to +/-31 days as appropriate.

http://www.etsy.com/developers/documentation/reference/billcharge#method_findallusercharges

As this is a behaviour change to this API call we intend to roll it out over the following timeline:

* 07/02/12, today: notify the API mailing list and add a note to this effect to the developer's documentation.
* 07/16/12, two weeks from now: monitor API requests and notify any developers relying on the old behavior.
* 07/25/12, three weeks from now: switch over to the new behavior, any requests that do not include min_created and max_created will be returned a HTTP 400 error response.

We realise that this might result in some additional work but hope you can appreciate that the current unrestricted approach slows down our response and, indirectly, your applications.

Cheers,

Paul.

Etsy client not usable thread-safely with multiple API keys

Using multiple API credentials with the client is currently impossible to do thread-safely since everything is in the global module. I propose creating an Etsy::Client class, like the Twitter gem's Twitter::Client. This would permit creating separate instances of it for the multi-key use case, and an instance of it could be stuffed in the module to keep backwards compatibility.

Gem won't work with rails 3.1.1 -- JSON version lock conflict

I'm having an issue getting the etsy gem to work with the rails 3.1.1
bundle install give the following result:

Bundler could not find compatible versions for gem "json":
  In Gemfile:
    rails (= 3.1.1) ruby depends on
      json (~> 1.4) ruby

json (1.1.0)

Historic sales data?

Can the gem be used to retrieve historic sales data and transaction information for an authorized user's shop?

Image API

Create and Destroy of Image API, require a listing as parameter, but actually it only need a listing_id.

If start with a existing listing, it is fine, but think about the following scenario:

  1. Create a new listing then the API won't return a listing, it only return the listing_id(with current API when this issue raising)
  2. For adding image to the newly created listing, you have to query the whole listing with the listing_id again
  3. Then using the Create Image API to add image

Suggestion:
Change Create and Destroy API to using listing_id, then it will work for both scenario.

ShippingTemplate response is nil

I have set up my profile on etsy and a shop within the profile (in development mode). I also added a shipping profile within the shop. As I understand, this shipping profile is what would be returned if I try to find shippingtemplates associated with the user (I can't find a way to directly create a shipping profile for a user on Etsy website, it seems to be possible only within a shop).

But, I get a nil response for the shipping template (sequence below).

Am I doing something wrong?

2.1.2 :019 > user=Etsy.user('xxxx')
...
...
2.1.2 :019 > credentials = {:access_token=>"xxxx", :access_secret=>"xxxx"}
....
2.1.2 :020 > ship_template=Etsy::ShippingTemplate.find_by_user(user, credentials)
=> nil
2.1.2 :021 >

Thanks!

Listing.find_all_by_shop_id() throws error with state=sold

Listing.find_all_by_shop_id() is throwing Etsy::EtsyJSONInvalid when the state is set to sold.

Example:

access = { :access_token => 'mytoken', :access_secret => 'mysecret' }
listings = Etsy::Listing.find_all_by_shop_id(myshop_id, access.merge(:state => :sold, :limit => 100, :offset => 0))

All other valid states (active, inactive, expired, featured) work as expected.

Can't get associated fields

So the point is getiing user profile fields, but executing next:

Etsy::Request.get('/users/SELF?includes=Profile', :access_token => @access_token.token, :access_secret => @access_token.secret)

Have an error:
HTTPBadRequest 400 Bad Request

@access_token getting from OAuth.

Btw if i want to get user:

Etsy::Request.get('/users/SELF', :access_token => @access_token.token, :access_secret => @access_token.secret)

It returns hash with some user fields.

New gem push

With Etsy moving to HTTPS only api on March 17, should we push a new version of the gem @kytrinyx ?

Blow up loudly—don't silence errors

It's incredibly frustrating to get nil or empty responses when in reality the API complained quite specifically that the permissions were wrong given the scope of the token, or some such thing.

Etsy.access_token 500's in :sandbox

I'm trying to get OAuth set up per the instructions in the README, but when I get to:

access = Etsy.access_token(request.token, request.secret, 'my_verification_code')

I get a a 500. I have tried with ruby 1.9.2 and 1.8.7. I am using the latest github version.

1.8.7 :003 > access = Etsy.access_token(request.token, request.secret, "1fac4eee")
Net::HTTPFatalError: 500 "Server Error"
from /Users/rellik/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/net/http.rb:2105:in error!' from /Users/rellik/.rvm/gems/ruby-1.8.7-p357@etsy/gems/oauth-0.4.5/lib/oauth/consumer.rb:221:intoken_request'
from /Users/rellik/.rvm/gems/ruby-1.8.7-p357@etsy/gems/oauth-0.4.5/lib/oauth/tokens/request_token.rb:18:in get_access_token' from ./lib/etsy/secure_client.rb:55:inclient_from_request_data'
from ./lib/etsy/secure_client.rb:63:in client' from ./lib/etsy.rb:133:inaccess_token'
from (irb):3

When gettting shop listings variations are empty

Hi,

When trying to get the shop listings and looping over them, each listing has the property
has_variations = true,
yet the array listing.variations remains empty
I couldn't find a way to force the fetching of this association, yet other associations like images do get pulled.
Pulling the single listing on its own by Id and requesting the association, the variations are populated:
listing = Etsy::Listing.find(listing.id, {:includes => 'Variations'})
However I don't want to fetch each listing independently, which would be awfully bad performance.

Thanks
Amit

Developers at Etsy?

We are having a massive issue with Etsy API at the moment, and their developer support is not responding.

Does anybody have any contacts at Etsy that they can send me? Any help would be appreciated.

Thanks guys!

Failed to upload image: 400 Bad Request

require 'etsy'
Etsy.silent_errors = false
Etsy.api_key='xxxx'
Etsy.api_secret='xxxx'
Etsy.protocol = 'https'
access = {:access_token => 'xxxx', :access_secret => 'xxxx'}
listing = Etsy::Listing.find(yyyy)
Etsy::Image.create(listing, 'C:/temp/test.jpg', access)

=> #<Etsy::Response:0x2e4b338 @raw_response=#<Net::HTTPBadRequest 400 Bad Request readbody=true>>

Other calling of api all works fine.

I debugged it, the body of raw_response said "please make sure both width and height are greater than 10px", but I am quite sure that test.jpg satisfy this condition.

How to get some user fields?

Hi to all...
I need to get such user field as city, but on typing:
>> user.city
get error:
NoMethodError: undefined method `city' for #Etsy::User:0xb6d2c2cc

There is how i get user:
>> user = Etsy.user('littletjane'))
=> #<Etsy::User:0xb6d3df90 @result={"referred_by_user_id"=>nil, "login_name"=>"littletjane", "user_id"=>5327518, "creation_tsz"=>1191381578, "feedback_info"=>{"count"=>501, "score"=>100}}>

also method seller? doesen't work...
>> user.seller?
give me error:
NoMethodError: undefined method `seller?' for #Etsy::User:0xb6d2c2cc

What i'm doing wrong?
Thx...

Allow for "single user" mode

Allow the setting of Etsy.access_token and Etsy.access_secret to be passed on all calls to allow simplified use by a single user.

rubygems.org out of date

The latest version of the gem on rubygems.org is 0.2.7, and does not support fetching listings of shops over 25 items. the latest version (on github) seems to be 1.8.10. Is there a reason that rubygems.org isn't up to date?

Documentation Request!

Hey guys!

I just went through a huge debacle with Etsy and my own site because I was doing custom requests the wrong way. I'm not sure where it all started, but I was making requests like:

Etsy::Request.get("/users/:shop_id/charges", access.merge(:shop_id => @shop))

Where I ought to have been calling it as:

Etsy::Request.get("/users/#{@shop}/charges", access)

Etsy's documentation is not formatted well and I completely missed the section describing that it has to work like the latter, and their recent update made it so the former type of call doesn't work at all.

I was just thinking it'd be helpful to append the Custom Request section of the readme to explain that you need to substitute the :variable in your URL's with the actual variable. What do you guys think? Helpful?

Getting Listings for one section

Hi,

Thanks for writing this gem! :) Can you tell me how to get the Listings for a single section of a single shop? I have the section I want but can't figure out how to work with it...

https://www.etsy.com/developers/documentation/reference/listing#method_findallshopsectionlistings says I need to pass at least shop_id and shop_section_id - is the below the correct syntax for that? I'm hoping that I'm just missing something from *identifiers_and_options but I don't know what it is. Can you help?

irb(main):044:0> user.shop.id
=> 5308141

irb(main):045:0> sect
=> #<Etsy::Section:0x00000001af7728 @result={"shop_section_id"=>7794481, "title"=>"Cabochons", "rank"=>5, "user_id"=>5569833, "active_listing_count"=>15}, @token=nil, @secret=nil>

irb(main):046:0> Etsy::Listing.find({:shop_id => user.shop.id, :shop_section_id => sect})
Etsy::EtsyJSONInvalid: Etsy::EtsyJSONInvalid
    from /var/lib/gems/1.9.1/gems/etsy-0.3.0/lib/etsy/response.rb:92:in `validate!'
    from /var/lib/gems/1.9.1/gems/etsy-0.3.0/lib/etsy/response.rb:58:in `result'
    from /var/lib/gems/1.9.1/gems/etsy-0.3.0/lib/etsy/model.rb:67:in `get_all'
    from /var/lib/gems/1.9.1/gems/etsy-0.3.0/lib/etsy/model.rb:24:in `get'
    from /var/lib/gems/1.9.1/gems/etsy-0.3.0/lib/etsy/model.rb:96:in `find_one_or_more'
    from /var/lib/gems/1.9.1/gems/etsy-0.3.0/lib/etsy/listing.rb:75:in `find'
    from (irb):46
    from /usr/bin/irb:12:in `<main>'

Cheers,
Gavin.

404 Bad Request Response in all Oauth API requests

Etsy people enforced secure api request under openapi subdomain (details here).

The current released gem v.0.2.2 uses http only as you can see here

I was looking at the code in order to fix this, and it looks like there is a fix already for it (it was made on #64), any plans to make a new release on rubygems?

Allow Listing.find_all_by_shop_id to filter based on listing state

There are a few API calls for listings that deal with state. Ideally, we would just pass a parameter to Listing.find_all_by_shop_id that would choose the right endpoint. The calls I see that this would apply to:

My thoughts around an implementation look like this:

Listing.find_all_by_shop_id(123, :status => 'expired')

Where the :status parameter can accept a value of active, expired, featured, or inactive -- for now we can have it default to active if it's not present.

Shop name and user name do not have to be the same

I am getting an error with Etsy.myself(token, secret).shop giving an error of 'username' is not a valid shop name because my username is not the same as my shop name. Am I trying to access this correctly?

Multilanguage support

Hi everyone,
Etsy recently enabled support for Russian language (as I know other languages are available as well). Is there the way to get shop items in different languages?

Regards,
Dmitry

Pagination in model.rb

What I am trying to do: Get all of the items in a resource (listings, orders, receipts, etc...) But It's always returning 100.

Here is what I noticed:

In https://github.com/kytrinyx/etsy/blob/master/lib/etsy/model.rb, line 46:

limit = [response.count - batch_size - initial_offset, 0].max

In this file:

https://github.com/kytrinyx/etsy/blob/master/lib/etsy/response.rb

Line 35-41:

def count
  if paginated?
    to_hash['results'].nil? ? 0 : to_hash['results'].size
  else
    to_hash['count']
  end
end

So ---- if there is pagination, it returns COUNT as the size of the results set. Doesn't that means in model.rb, LIMIT will always be <= 0, which means that when you do {:limit => :all}, you are not getting all, which defeats the whole purpose?

Am I missing something here?

In my app, I had to monkeypatch Etsy::Response.paginated? to return "false".

Responses never raise errors

Hi,

I would like to report a usability issue.
Calling result on a response will return an empty array if the request was not successful. I think it should raise an error instead.
You made excellent work defining error classes in the response class, why not use them?
This is what other api wrappers do, and for good reason. Consider this: the user revoked access. API consumers need to know when such a situation occurs. But they never will, they get an empty array instead of the error.
Recommendation: raise errors in the result method.
I'm making a basic pull request illustrating this.

Thanks!

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

  spec.license = 'MIT'
  # or
  spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

Grabbing results count

Hi, unless I am mistaken, it seems there is no way to grab the number of results in an API query. For example if we run a query on Listings, and call the count method it will only tell us how many listings are returned based on the limit, not the total number of results available. Is there any way to grab the total number of results available (i.e. a number greater than 250)?

Shop data for authorized user is nil

I've managed to authorize a user in the console, but the shop data that gets returned is all "", nil or 0. My shop has lots of sales, feedback and whatnot, but its all coming back empty. Could this be a json version problem?

Any help would be much appreciated.

CI is failing, jruby this time

I'm tempted to stick jruby on the "allowed failures" list. I suspect that if you're writing an etsy app, you're not deploying it on rubinius or jruby. It might be OK to deprecate support for these.

Could't get __SELF__ response

I have tried doing oauth and tried fetching SELF i.e. Etsy.myself() but it gives me 400 bad request error. Though I tried with standalone request as well and still it gives error. So I have asked to etsy support team as well.

Thanks,
Anand Soni

OAuth not generating new request tokens!

Hey there!

I've been playing around with the gem quite a bit the last few days, and I've been having trouble getting it working in production for really only one reason – new request tokens weren't being issued. I'm realizing now it may not be just in production.

Person A would have no problem generating a request token, hitting allow & being taken to the callback, where I could save the access token, just like in the readme. But then Person B would come along, and it would be the exact some request token as Person A, so Etsy would say "sorry, that's been used already."

I thought at first it was because it was getting hung up on the fact that @request_token already existed, but I'm not sure.

class VerificationRequest # :nodoc:all
  def request_token
    @request_token ||= client.request_token
  end
end

I tested out what would happen with manually setting @request_token as false right before (and as a different test, right after), to force it to request a new token, but found that that just ended up with each person being connected to the last person's OAuth credentials. Not so good.

I'll keep trying stuff and seeing what I can find, do you guys have any ideas?

Is anyone working on updates for new version of API?

Etsy is pushing out a brand new version of their API in early February. Is anyone working on amending this gem so that it is compatible with the new version? I do not want to reinvent the wheel if the work is already being done. Otherwise I will begin working on adjustments ASAP

Depends on json 1.4.0

The latest version of json is 1.5.1. You should change your gemspec to support ">=1.4.0" instead of "~>1.4.0"

All Requests = '400 Bad Request' (or so it seems)

It seems that I get a '400 Bad Request' result for any request I try to make. Is something broken or am I missing something?

jeremiahs-mbp:jds jdm$ ruby -v
ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin13.0.0]

jeremiahs-mbp:jds jdm$ bundle show etsy
/Users/jdm/.rvm/gems/ruby-2.0.0-p353@e/gems/etsy-0.2.5

jeremiahs-mbp:jds jdm$ irb
2.0.0p353 :001 > require 'rubygems'
2.0.0p353 :002 > require 'etsy'
2.0.0p353 :003 > Etsy.api_key = '***********'
2.0.0p353 :004 > Etsy.api_secret = '************'
2.0.0p353 :011 > Etsy.environment = :production
2.0.0p353 :014 > request = Etsy.request_token
 => #<OAuth::RequestToken ... >

2.0.0p353 :015 > Etsy.verification_url
 => "https://www.etsy.com/oauth/ ... > 

2.0.0p353 :016 > access = Etsy.access_token request.token, request.secret, '5fc35f7b'
 => #<OAuth::AccessToken ... >

2.0.0p353 :018 > access = {access_token: access.token, access_secret: access.secret}

2.0.0p353 :027 > Etsy::Request.get('/shops/9RCSC', access)
 => #<Etsy::Response:0x007f9fa40bc160 @raw_response=#<Net::HTTPBadRequest 400 Bad Request readbody=true>>

2.0.0p353 :028 > Etsy::Request.get('/users/__SELF__', access)
 => #<Etsy::Response:0x007f9fa405fd70 @raw_response=#<Net::HTTPBadRequest 400 Bad Request readbody=true>>

Thanks, Jeremiah

Very High Memory Usage

This gem uses up 18% of my system memory on a 4gb server... Still trying to decide if it's how my code is using the gem... or the gem itself. Has anybody seen spikes in memory usage from this gem? Most of our importing is done via Delayed Jobs.

Unable to get `myself`

Having obtained (and saved) the Etsy access_token and access_secret, I am trying to get Etsy.myself.
I am unable to however, as after passing in the :oauth_consumer_key, I get oauth_problem=signature_invalid.

Calling like this:

Etsy.myself "<my_access_token>","<my_access_secret>", :oauth_consumer_key => "<my_etsy_api_key>"

Getting this:

oauth_problem=signature_invalid
&amp;debug_sbs=GET
&amp;http://sandbox.openapi.etsy.com/v2/users/__SELF__
&amp;oauth_consumer_key=<my_api_key>
&amp;oauth_nonce=<some_random_string>
&amp;oauth_signature_method=HMAC-SHA1
&amp;oauth_timestamp=<some_time_stamp>
&amp;oauth_token=<my_access_token>
&amp;oauth_version=1.0  

Note that I am able to get a session like this:

session = Etsy::SecureClient.new :access_token => "<my_access_token>", :access_secret => "<my_access_secret>"

But if I try to get __SELF__:

session.get "/users/__SELF__"   

I get a 404 message: Not Found.

Is this a bug in the gem?

cannot generate request token

We are using the rubygems version of the gem, not the github version, with Ruby v2.1.1. We get an OpenSSL error. I've changed them in this issue for obvious reasons but the real api key and secret work using PostMan and HTTParty.

irb(main):002:0> Etsy.api_key = 'x03ho6jzhg4g7m5obqqqwer134kad'
=> "xertuy67ihg4g7m5oq4rq345d"
irb(main):003:0> Etsy.api_secret = 'kt5p1gbe02'
=> "kt5p1gbe02"
irb(main):004:0> request = Etsy.request_token
OpenSSL::SSL::SSLError: hostname does not match the server certificate
from /usr/lib/ruby/1.9.1/openssl/ssl-internal.rb:129:in post_connection_check' from /usr/lib/ruby/1.9.1/net/http.rb:801:inconnect'
from /usr/lib/ruby/1.9.1/net/http.rb:755:in do_start' from /usr/lib/ruby/1.9.1/net/http.rb:744:instart'
from /usr/lib/ruby/1.9.1/net/http.rb:1284:in request' from /home/flatiron/recommendsy/shared/bundle/ruby/1.9.1/gems/oauth-0.4.7/lib/oauth/consumer.rb:161:inrequest'
from /home/flatiron/recommendsy/shared/bundle/ruby/1.9.1/gems/oauth-0.4.7/lib/oauth/consumer.rb:194:in token_request' from /home/flatiron/recommendsy/shared/bundle/ruby/1.9.1/gems/oauth-0.4.7/lib/oauth/consumer.rb:136:inget_request_token'
from /home/flatiron/recommendsy/shared/bundle/ruby/1.9.1/gems/etsy-0.2.6/lib/etsy/secure_client.rb:36:in request_token' from /home/flatiron/recommendsy/shared/bundle/ruby/1.9.1/gems/etsy-0.2.6/lib/etsy/verification_request.rb:13:inrequest_token'
from /home/flatiron/recommendsy/shared/bundle/ruby/1.9.1/gems/etsy-0.2.6/lib/etsy.rb:151:in request_token' from (irb):4 from /home/flatiron/recommendsy/shared/bundle/ruby/1.9.1/gems/railties-4.1.0.rc2/lib/rails/commands/console.rb:90:instart'
from /home/flatiron/recommendsy/shared/bundle/ruby/1.9.1/gems/railties-4.1.0.rc2/lib/rails/commands/console.rb:9:in start' from /home/flatiron/recommendsy/shared/bundle/ruby/1.9.1/gems/railties-4.1.0.rc2/lib/rails/commands/commands_tasks.rb:69:inconsole'
from /home/flatiron/recommendsy/shared/bundle/ruby/1.9.1/gems/railties-4.1.0.rc2/lib/rails/commands/commands_tasks.rb:40:in run_command!' from /home/flatiron/recommendsy/shared/bundle/ruby/1.9.1/gems/railties-4.1.0.rc2/lib/rails/commands.rb:17:in<top (required)>'
from bin/rails:8:in require' from bin/rails:8:in

'irb(main):005:0>

400 Error on New Listing

I am getting a 400 error when trying to create a new listing:

        @listing = Etsy::Listing.create(@access.merge(
            title: "test",
            description: "test description",
            quantity: 10,
            price: 5.5,
            who_made: "someone_else",
            is_supply: true,
            when_made: "before_1997",
            state: "draft",
            shipping_template_id: 12605497
        ))

Any idea why this might be? I am able to successfully make other API calls...

Listings die when store has a single listing

When iterating over the listings returned on a store with a single listing, the listings are broken up into as many listing objects as attributes. I.e., if a listing has 30 attributes, you'll receive 30 listings with a single attribute.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.