Closed jch254 closed 6 months ago
interface Listing {
status: string;
original_price: OriginalPrice;
ships_from: string;
original_shipping_price: ShippingPrice;
price: Price;
allow_offers: boolean;
uri: string;
comments: string;
seller: Seller;
sleeve_condition: string;
shipping_price: ShippingPrice;
release: Release;
resource_url: string;
audio: boolean;
id: number;
condition: string;
posted: string;
// If the authorized user is the listing owner the listing will include
// the weight, format_quantity, external_id, and location keys.
// If the user is authorized, the listing will contain a in_cart boolean
// field indicating whether or not this listing is in their cart.
in_cart?: boolean;
weight?: number;
external_id?: string;
location?: string;
format_quantity?: number;
}
interface OriginalPrice {
converted?: OriginalPrice; // appears in marketplace
curr_abbr: string;
formatted: string;
value: number;
curr_id: number;
}
interface ShippingPrice {
currency: string;
value: number;
}
interface Price {
currency: string;
value: number;
}
Discogs allows the user to their currency settings and converts the data returned from the API based on this
Changing the
SHIPS_FROM
env var should utilise the original currencies of listings accordingly as opposed to using the the user currency setting.