get_inventory: Get a seller’s inventory

Description Usage Arguments Details Examples

View source: R/Marketplace.R

Description

Get a seller’s inventory

Usage

1
2
3
4
5
get_inventory(
  username,
  options = list(),
  token = NA
)

Arguments

username

String containing a valid username

options

(optional) Parameters, see Details

token

(optional) Token object obtained from authorize() or a string containing your personal access token

Details

If you are not authenticated as the inventory owner, only items that have a status of For Sale will be visible. If you are authenticated as the inventory owner you will get additional 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.

Parameters

Below are optional parameters that can be provided to the options argument

status

Only show items with this status, for example: for sale

sort

Sort items by one of the following fields: listed, price, item (i.e. the title of the release) artist, label, catno, audio, status (when authenticated as the inventory owner), location (when authenticated as the inventory owner)

sort_order

Sort items in a particular order (one of asc or desc)

Examples

1
2
3
inventory <- get_inventory("username")

inventory <- get_inventory("username", options = list("sort" = "artist", "sort_order" = "desc"))

Pascallio/discogsAPI documentation built on Dec. 31, 2020, 3:27 p.m.