Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#1,671 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
52/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
api

Hướng nghiên cứu

Bắt đầu với packages/api-request-builder/src/query-projection.js và xem xét cách các request product projection được ghép lại. Sử dụng endpoint product-projection-by-key được ghi trong tài liệu và các ví dụ của issue để xác minh rằng các query parameter locale và store được thể hiện trong các URL request đã dựng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
JavaScript
Star
77
Fork
70
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của commercetools/nodejs

Tất cả issue của commercetools/nodejs

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.