Closed charusat09 closed 7 years ago
Thank you so much for your contribution!!
Do you mind updating the failing tests before we merge?
Do you know if this will slow down the request at all? Product syncs are a big use case and I'd hate to slow down the request for anyone not using variants.
ping @zvuki @ICarpenter can you help address @jayelkaake's question?
@jayelkaake I understand your concern about performance. In that case we can create a separate API endpoint that will help us to fetch product with variants, custom fields and images hence, existing product API will work smoothly. I am open for discussion. Please let me know your thoughts for this.
@charusat09 I think you're trying to use includes from the V3 API in this PR, but unfortunately this client is intended for use with our V2 API at this time.
For the V3 API our current solution is to allow client auto-generation using swagger - you can plug our V3 API swagger file from here: https://github.com/bigcommerce/api/blob/master/swagger/v3-catalog.yaml
Into here: http://editor.swagger.io/
Which should give you the option to auto-generate a client at the top.
In the future we may look into updating this client or versioning it to support V3.
Hey @bookernath currently I am using this same gem for both the versions i.e. v2 and v3. we can upgrade same library to handle both APIs. I can do that. Please share your thoughts on this?
The swagger spec url in @bookernath's comment seems to have moved. Here's the new url of the swagger V3 Catalog Spec. https://raw.githubusercontent.com/bigcommerce/api-specs/master/reference/catalog.v3.yml
This will enhance GET /products and GET /products/:id endpoints to fetch variants and options in one API call.