Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.
This repository was 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

@ericblade

Description

@ericblade

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions