Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api-request-builder: Request to Add Locale and Store Query Parameters #1671

Open
jonsharratt opened this issue Mar 22, 2021 · 0 comments
Open

Comments

@jonsharratt
Copy link

jonsharratt commented Mar 22, 2021

Support reference number

N/A

Description

Currently we are unable to use / apply store or locale query parameters using the fluent api request builder package.

const uri = requestBuilder.productProjections
  .locale('locale')
  .byKey('key')
  .build();
  
const uri = requestBuilder.productProjections
  .store('store')
  .byKey('key')
  .build();

ref:
https://docs.commercetools.com/api/projects/productProjections#get-productprojection-by-key

Expected Behavior

See possible solution and examples of what we would hope could be a possible api addition.

Current Behavior

Functions for these beta Query Parameters currently not available.

Context

Looking to keep our codebase clean and use the fluent api for all of our requests.

Possible Solution

Add the beta options for:

  • storeProjection
  • localeProjection
 const uri = requestBuilder.productProjections
      .locale('de-DE')
      .byKey('key')
      .build();
 const uri = requestBuilder.productProjections
      .store('store')
      .byKey('key')
      .build();

https://github.com/commercetools/nodejs/blob/aa630f042929864d0a06a6461e876ec305d5a775/packages/api-request-builder/src/query-projection.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant