Coder Social home page Coder Social logo

granga / etsy-ts Goto Github PK

View Code? Open in Web Editor NEW
37.0 2.0 5.0 4.32 MB

Etsy API wrapper written in typescript

Home Page: https://www.npmjs.com/package/etsy-ts

License: MIT License

TypeScript 96.87% EJS 3.13%
etsy api wrapper typescript javascript promise v3 client library etsy-api-v3

etsy-ts's Issues

Working with resources

Etsy API supports ability to query data related to a certain entity, all within one request.
https://www.etsy.com/developers/documentation/getting_started/resources

Currently, we can use the "include" parameter as an array of strings. However each of these strings is a name of an entity and there should be some restrictions / types what this array can accept.

Etsy API allows retrieving up to 3 nested associations with this syntax:
?includes=Association[(fieldname[,fieldname...])][:scope][:limit[:offset]][,Assocation...]

Research how other typed Etsy API wrappers have achieved this. If there are no examples find a good solution that allows easy creation of these queries. The query should be typed and it should also predict the exact result type.

Way to fetch ALL (as opposed to limited to 100) records

When there is a paginated data Etsy returns max of 100 records even though sometimes there can be thousands.

Create a way to iterate from 0 to results.count and accumulate all records and return them in one big array. Make use of offset parameter.

Add changelog/releases

Can't really see what's going on from version to version. Release notes would be good

Generate documenetation

Find a good tool for typescript documentation generation.
Generate and publish the documentation on GitHub pages.

There is no way to use updateInventory

oauth_problem=signature_invalid&debug_sbs=PUT&https%3A%2F%2Fopenapi.etsy.com%2Fv2%2Flistings%2F964345818%2Finventory&oauth_consumer_key%3Dfxpjow81qxm1ullsdvi0item%26oauth_nonce%3DjBL2EoZXHQyHTaSBC8VxIYDmjcpNWmqG%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1615410408%26oauth_token%3Db203a290d6696ba022d55579138e3a%26oauth_version%3D1.0%26products%3D%255B%257B%2522property_values%2522%253A%255B%257B%2522property_id%2522%253A513%252C%2522ott_value_qualifier%2522%253A1%252C%2522property_name%2522%253A%2522Bracelet%2520length%2522%252C%2522scale_id%2522%253Anull%252C%2522scale_name%2522%253Anull%252C%2522value_id%2522%253A7%252C%2522values%2522%253A%255B%252216%2520cm%2522%255D%257D%255D%252C%2522offerings%2522%253A%255B%257B%2522price%2522%253A99%252C%2522quantity%2522%253A100%257D%255D%257D%255D

How to use?

Is this supposed to be used in node or in browser?

axios package version

Thanks for the useful package. I've noticed the axios package is out-dated. axios-auth-refresh latest version now uses ^1.2.2. Is there plans to upgrading the one here?

Etsy API for createReceiptShipment uses application/x-www-form-urlencoded

The code currently works with a JSON encoded body. The body should actually use application/x-www-form-urlencoded. Maybe it can be changed here.

Working code for createReceiptShipment:

            var urlencoded = new URLSearchParams();
            urlencoded.append("tracking_code", data.tracking_code);
            urlencoded.append("carrier_name", data.carrier_name);
            urlencoded.append("send_bcc", data.send_bcc);
            return _this.http.request((0, tslib_1.__assign)({ path: "/v3/application/shops/" + shopId + "/receipts/" + receiptId + "/tracking", method: "POST", body: urlencoded, secure: true, type: http_client_1.ContentType.UrlEncoded, format: "json" }, params));

Solution

  • see if we can switch to JSON based connection
  • update requests to url encode if needed

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.