Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

consistency in API names (Asin vs ASIN, Sku vs SKU, etc) #178

Open
ericblade opened this issue Aug 17, 2020 · 0 comments
Open

consistency in API names (Asin vs ASIN, Sku vs SKU, etc) #178

ericblade opened this issue Aug 17, 2020 · 0 comments
Milestone

Comments

@ericblade
Copy link
Owner

ericblade commented Aug 17, 2020

There's obvious things wrong here:

    getInboundGuidanceForASIN(params: GetInboundGuidanceForASINParams): Promise<InboundGuidanceList>;
    static getInboundGuidanceForASIN(params: GetInboundGuidanceForASINParams): Promise<InboundGuidanceList>;
    getInboundGuidanceForSKU(params: GetInboundGuidanceForSKUParams): Promise<InboundGuidanceList>;
    static getInboundGuidanceForSKU(params: GetInboundGuidanceForSKUParams): Promise<InboundGuidanceList>;

    getLowestPricedOffersForAsin(params: GetLowestPricedOffersForAsinParams): Promise<GetLowestPricedOffersReturn>;
    static getLowestPricedOffersForAsin(params: GetLowestPricedOffersForAsinParams): Promise<GetLowestPricedOffersReturn>;
    getLowestPricedOffersForSku(params: GetLowestPricedOffersForSkuParams): Promise<GetLowestPricedOffersReturn>;
    static getLowestPricedOffersForSku(params: GetLowestPricedOffersForSkuParams): Promise<GetLowestPricedOffersReturn>;
    getProductCategoriesForAsins(params: { marketplaceId: MarketplaceId, asins: Array<string> }): Promise<GetProductCategoriesReturn>;
    static getProductCategoriesForAsins(params: { marketplaceId: MarketplaceId, asins: Array<string> }): Promise<GetProductCategoriesReturn>;
    getProductCategoriesForSkus(params: { marketplaceId: MarketplaceId, sellerSkus: Array<string> }): Promise<GetProductCategoriesReturn>;
    static getProductCategoriesForSkus(params: { marketplaceId: MarketplaceId, sellerSkus: Array<string> }): Promise<GetProductCategoriesReturn>;
  1. We should be able to reduce each of these down to a single incoming API surface, getInboundGuidance, getLowestPricedOffers, getProductCategories. User can provide type ASIN or SKU, and/or we could try to figure it out automatically (if it doesn't look like an ASIN, then assume it's a SKU?) if not given. We figure out what it is, and then pass it transparently to Amazon via their APIs. On the value return, though, we probably need to make sure that we specify what type of data was requested/returned. Pretty sure that's already handled from the MWS side.

  2. If we are left having to refer to SKU or ASIN anywhere, then we need to make it consistently either all upper-case since they are abbreviations, or consistently all camel-case to go with the code style standards.

@ericblade ericblade added this to the 3.0.0 milestone Aug 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant