Package 'tidycrates'

Title: Tidy Data from the 'Discogs' API
Description: Sends requests to the 'Discogs' application programming interface (API) <https://www.discogs.com/developers> and returns the results as tidy tibbles. The 'Discogs' database can be searched, and releases, master releases, artists and labels can be read from it, along with the releases of an artist or label and the versions of a master release. The collection folders, collection and wantlist of a user can be listed, tallied and plotted, and marketplace statistics, price suggestions and collection values can be read. Tracklists, credits, formats, identifiers and companies of releases can be unnested into one row per item. Requests can be made with a personal access token or without one. They stay within the rate limit of the API and are retried when the limit is exceeded. Responses can be cached for the session, and paginated results can be fetched in full.
Authors: Massimiliano Canzi [aut, cre, cph] (ORCID: <https://orcid.org/0000-0001-6124-0321>)
Maintainer: Massimiliano Canzi <[email protected]>
License: MIT + file LICENSE
Version: 0.2.0
Built: 2026-11-20 21:27:50 UTC
Source: https://github.com/mcanzi/tidycrates

Help Index


Get artists

Description

Gets artists from the 'Discogs' database. Names that several artists share are told apart by a number in brackets, for example "Persuader (2)".

Usage

dig_artist(id)

Arguments

id

One or more artist IDs, as numbers or as codes copied from 'Discogs' such as "a1" or "[a1]".

Details

Profiles keep the 'Discogs' markup for links, such as ⁠[a=Carl Craig]⁠. Images are left out, because the people who upload them can hold their own copyright. dig_artist_releases() lists the releases of an artist.

Value

A tibble with one row per artist, or NULL invisibly if the API cannot be reached. The columns are artist_id, name, real_name, profile, data_quality, uri, urls and name_variations as list columns of character vectors, and aliases, members and groups as list columns of tibbles.

Examples

dig_artist(1)

List the releases of an artist

Description

Lists the releases and master releases an artist appears on, with the role of the artist on each.

Usage

dig_artist_releases(
  id,
  sort = c("year", "title", "format"),
  order = c("asc", "desc"),
  all = FALSE,
  page = 1,
  per_page = 50
)

Arguments

id

An artist ID, as a number or as a code copied from 'Discogs' such as "a1" or "[a1]".

sort

The column to sort by: "year", "title" or "format".

order

The sort order: "asc" or "desc".

all

If TRUE, all pages are fetched and page and per_page are ignored.

page

The page to fetch.

per_page

The number of items per page, from 1 to 100.

Details

'Discogs' returns up to 100 items per page and sometimes fewer than per_page. With all = TRUE, every page is fetched, which takes one request for each 100 items. If this takes a minute or more, a message gives the least time it takes.

Value

A tibble with one row per release or master release, or NULL invisibly if the API cannot be reached. type tells releases and master releases apart, and id is the ID of either. have and want are the numbers of users with the item in their collection or wantlist.

Examples

dig_artist_releases(1, all = TRUE)

Set the 'Discogs' token

Description

Sets the personal access token used for requests in this session. With a token, 'Discogs' allows 60 requests a minute instead of 25, dig_collection() and dig_wantlist() can read your own collection and wantlist when they are private, and dig_search(), dig_price_suggestions() and dig_collection_value() work. A token can be generated at https://www.discogs.com/settings/developers.

Usage

dig_auth(token = Sys.getenv("DISCOGS_TOKEN"))

Arguments

token

A personal access token. By default the value of the DISCOGS_TOKEN environment variable. An empty string removes the token, so requests are made without one. Spaces at either end are removed, and a token with spaces or line breaks inside is rejected.

Details

If dig_auth() is never called, the DISCOGS_TOKEN environment variable is used. Storing the token in .Renviron keeps it out of your scripts.

Value

TRUE if a token is set and FALSE otherwise, invisibly.

Examples

dig_auth()

Clear the cache

Description

Removes the responses that were cached because the option tidycrates.cache is TRUE, and the username found for the token by functions such as dig_collection(). The next requests are sent to 'Discogs' again.

Usage

dig_cache_clear()

Value

NULL, invisibly.

Examples

dig_cache_clear()

List the collection of a user

Description

Lists the releases in the collection of a 'Discogs' user. Anyone can read a public collection. A private collection can only be read with the token of its owner, see dig_auth(). Without a username, the collection of the token owner is listed.

Usage

dig_collection(
  username = NULL,
  folder = 0,
  sort = c("added", "artist", "title", "label", "catno", "format", "rating", "year"),
  order = c("asc", "desc"),
  all = FALSE,
  page = 1,
  per_page = 50
)

Arguments

username

A 'Discogs' username, or NULL for the owner of the token set with dig_auth(). Finding the owner takes one request, once per session.

folder

The ID of a collection folder, see dig_collection_folders(). The default, 0, holds the whole collection and is the only folder other users can read.

sort

The column to sort by: "added", "artist", "title", "label", "catno", "format", "rating" or "year".

order

The sort order: "asc" or "desc".

all

If TRUE, all pages are fetched and page and per_page are ignored.

page

The page to fetch.

per_page

The number of items per page, from 1 to 100.

Details

A release that is in the collection more than once has one row per copy, each with its own instance_id. Collections are never cached, so changes show up at once.

The media and sleeve conditions come from the collection fields named Media and Sleeve. If any copy has a value in a field, the fields are matched by name with one more request. Other fields, such as Notes, are left out. Without the token of the owner, only public fields can be read, and the conditions are NA for fields that are private. If the fields cannot be read, a message says so and the conditions are NA.

The folder names are read with one more request, as in dig_collection_folders(). Other users can only see folder 0, so the names of other folders are NA without the token of the owner. The request is skipped without a token, and when the token owner is known from an earlier call to be someone else. If the folders cannot be read, a message says so and the names are NA.

Value

A tibble with one row per copy of a release, or NULL invisibly if the API cannot be reached. The columns are release_id, instance_id, folder_id, folder, title, artist, year, label, catno, format, media_condition, sleeve_condition, genres and styles as list columns, master_id, rating and date_added. rating is NA if the user gave none. The conditions are factors from best to worst, with the same grades as dig_price_suggestions(). The sleeve condition can also be "Generic" or "No Cover", and a condition is NA if the user gave none.

Restricted Data

Collections, wantlists, usernames and marketplace data, such as prices and collection values, are Restricted Data under the 'Discogs' API Terms of Use. 'Discogs' grants each user a limited, personal licence to access and use them with their own token. They may not be passed on to anyone else or used for commercial purposes, and their use must respect the privacy of their owners. Keep them, and tallies and plots of them, for your own use, and do not publish them. The Terms of Use also forbid using the API to get around the 'Discogs' marketplace.

Examples

collection <- dig_collection("username", all = TRUE)
dplyr::count(collection, format, sort = TRUE)
dplyr::count(collection, media_condition)
dplyr::count(collection, folder)

List the collection folders of a user

Description

Lists the folders of a 'Discogs' collection, with the number of releases in each. Folder 0 holds the whole collection and folder 1 holds the releases that are in no other folder. Other users can only see folder 0, unless the collection is read with the token of its owner, see dig_auth(). Folders are never cached. dig_collection() adds the folder name of each copy itself.

Usage

dig_collection_folders(username = NULL)

Arguments

username

A 'Discogs' username, or NULL for the owner of the token set with dig_auth(). Finding the owner takes one request, once per session.

Value

A tibble with one row per folder and the columns folder_id, name and count, or NULL invisibly if the API cannot be reached. folder_id can be passed to dig_collection().

Restricted Data

Collections, wantlists, usernames and marketplace data, such as prices and collection values, are Restricted Data under the 'Discogs' API Terms of Use. 'Discogs' grants each user a limited, personal licence to access and use them with their own token. They may not be passed on to anyone else or used for commercial purposes, and their use must respect the privacy of their owners. Keep them, and tallies and plots of them, for your own use, and do not publish them. The Terms of Use also forbid using the API to get around the 'Discogs' marketplace.

Examples

dig_collection_folders("username")

Get the value of a collection

Description

Gets the minimum, median and maximum value of a collection, as 'Discogs' estimates it from marketplace sales. Only the owner of a collection can get its value, so this needs the owner's token, see dig_auth(). Without a username, the value of the token owner's collection is read.

Usage

dig_collection_value(username = NULL)

Arguments

username

A 'Discogs' username, or NULL for the owner of the token set with dig_auth(). Finding the owner takes one request, once per session.

Details

'Discogs' returns the values as formatted text, such as "$1,250.00". They are turned into numbers, and the currency symbol is kept in currency. The value is never cached.

Value

A tibble with one row and the columns username, minimum, median, maximum and currency, or NULL invisibly if the API cannot be reached. A value that cannot be read is NA.

Restricted Data

Collections, wantlists, usernames and marketplace data, such as prices and collection values, are Restricted Data under the 'Discogs' API Terms of Use. 'Discogs' grants each user a limited, personal licence to access and use them with their own token. They may not be passed on to anyone else or used for commercial purposes, and their use must respect the privacy of their owners. Keep them, and tallies and plots of them, for your own use, and do not publish them. The Terms of Use also forbid using the API to get around the 'Discogs' marketplace.

Examples

dig_collection_value()

Get labels

Description

Gets record labels and other companies, such as pressing plants and studios, from the 'Discogs' database.

Usage

dig_label(id)

Arguments

id

One or more label IDs, as numbers or as codes copied from 'Discogs' such as "l1" or "[l1]".

Details

Profiles keep the 'Discogs' markup for links. Images are left out, because the people who upload them can hold their own copyright. dig_label_releases() lists the releases of a label.

Value

A tibble with one row per label, or NULL invisibly if the API cannot be reached. The columns are label_id, name, profile, contact_info, parent_label, parent_label_id, data_quality, uri, urls as a list column of character vectors, and sublabels as a list column of tibbles.

Examples

dig_label(1)

List the releases of a label

Description

Lists the releases of a label or other company.

Usage

dig_label_releases(id, all = FALSE, page = 1, per_page = 50)

Arguments

id

A label ID, as a number or as a code copied from 'Discogs' such as "l1" or "[l1]".

all

If TRUE, all pages are fetched and page and per_page are ignored.

page

The page to fetch.

per_page

The number of items per page, from 1 to 100.

Value

A tibble with one row per release, or NULL invisibly if the API cannot be reached.

Examples

dig_label_releases(1)

Get master releases

Description

Gets master releases from the 'Discogs' database. A master release groups all versions of a release, such as the original pressing, later reissues and editions in other countries.

Usage

dig_master(id)

Arguments

id

One or more master release IDs, as numbers or as codes copied from 'Discogs' such as "m96559" or "[m96559]".

Details

Images are left out, because the people who upload them can hold their own copyright. dig_master_versions() lists the versions.

Value

A tibble with one row per master release, or NULL invisibly if the API cannot be reached. The columns are master_id, title, artist, year, genres, styles, main_release, most_recent_release, data_quality, uri and tracklist, a list column of tibbles that dig_tracklist() unnests.

Examples

dig_master(96559)

List the versions of a master release

Description

Lists the releases that belong to a master release, such as reissues and editions in other countries. The versions can be filtered by format, label, year and country.

Usage

dig_master_versions(
  id,
  format = NULL,
  label = NULL,
  released = NULL,
  country = NULL,
  sort = c("released", "title", "format", "label", "catno", "country"),
  order = c("asc", "desc"),
  all = FALSE,
  page = 1,
  per_page = 50
)

Arguments

id

A master release ID, as a number or as a code copied from 'Discogs' such as "m96559" or "[m96559]".

format, label, released, country

Values to filter the versions by, for example format = "Vinyl" or released = 1997.

sort

The column to sort by: "released", "title", "format", "label", "catno" or "country".

order

The sort order: "asc" or "desc".

all

If TRUE, all pages are fetched and page and per_page are ignored.

page

The page to fetch.

per_page

The number of items per page, from 1 to 100.

Value

A tibble with one row per version, or NULL invisibly if the API cannot be reached. have and want are the numbers of users with the version in their collection or wantlist.

Examples

dig_master_versions(1000, format = "CD")

Plot releases

Description

Plots the counts from dig_tally() with a title, a subtitle that says what is shown, and alt text for screen readers. Genres, styles, formats, labels, artists, roles and countries are drawn as ranked lollipops with the count and share at each tip. Decades are columns with their counts, years are columns with the busiest year marked, and by = "added" is a line of the running total. Plotting needs the ggplot2 package.

Usage

dig_plot(
  x,
  by = c("genre", "style", "format", "label", "artist", "role", "country", "decade",
    "year", "added"),
  n = 10,
  unique = FALSE
)

Arguments

x

A tibble returned by one of the functions listed in Details.

by

What to count by: "genre", "style", "format", "label", "artist", "role", "country", "decade", "year" or "added", the month a copy was added.

n

The number of values to keep for all but years, decades and months. The rest are counted together as "Other". Inf keeps all values.

unique

If TRUE, each release counts once, however many copies of it there are.

Details

The colours have a contrast of at least 3:1 with the background, and every value that is not on an axis is written next to its mark, so no value depends on colour alone. The title, subtitle and alt text can be changed with ggplot2::labs().

Every plot has the caption "Data provided by Discogs.", which the API Terms of Use require next to any data from 'Discogs'. Where you publish a plot, link the caption to the 'Discogs' page with the data. Plots of a collection or wantlist show Restricted Data, see dig_collection().

Value

A ggplot object, which can be changed with +, or NULL invisibly if x is NULL.

Examples

shelf <- tibble::tibble(
  release_id = c(1, 1, 2, 3),
  year = c(1994, 1994, 1998, NA),
  genres = list(c("Electronic", "Pop"), c("Electronic", "Pop"), "Electronic", "Jazz")
)
dig_plot(shelf, "genre")
dig_plot(shelf, "year")


collection <- dig_collection("username", all = TRUE)
dig_plot(collection, "decade")
dig_plot(collection, "added")
dig_plot(dig_artist_releases(1, all = TRUE), "role")

Get marketplace statistics

Description

Gets the lowest price and the number of copies for sale of releases in the 'Discogs' marketplace. A token is not needed.

Usage

dig_price_stats(id, currency = NULL)

Arguments

id

One or more release IDs, as numbers or as codes copied from 'Discogs' such as "r249504" or "[r249504]".

currency

The currency of the prices, one of "USD", "GBP", "EUR", "CAD", "AUD", "JPY", "CHF", "MXN", "BRL", "NZD", "SEK" or "ZAR", or NULL for the default.

Details

Prices change quickly, so these requests are never cached. Without a token and without currency, prices are in US dollars. With a token, they are in the buyer currency of your account.

Value

A tibble with one row per release, or NULL invisibly if the API cannot be reached. The columns are release_id, lowest_price, currency, for_sale, the number of copies for sale, and blocked, which is TRUE if the release may not be sold. lowest_price and currency are NA if no copy is for sale, and for_sale is NA if the release is blocked.

Restricted Data

Collections, wantlists, usernames and marketplace data, such as prices and collection values, are Restricted Data under the 'Discogs' API Terms of Use. 'Discogs' grants each user a limited, personal licence to access and use them with their own token. They may not be passed on to anyone else or used for commercial purposes, and their use must respect the privacy of their owners. Keep them, and tallies and plots of them, for your own use, and do not publish them. The Terms of Use also forbid using the API to get around the 'Discogs' marketplace.

Examples

dig_price_stats(249504, currency = "EUR")

Get price suggestions

Description

Gets the prices 'Discogs' suggests for releases in each condition, from Mint to Poor. Price suggestions need a token, see dig_auth(), and the seller settings of the account must be filled in on 'Discogs'.

Usage

dig_price_suggestions(id)

Arguments

id

One or more release IDs, as numbers or as codes copied from 'Discogs' such as "r249504" or "[r249504]".

Details

The prices are in the selling currency of your account. They are never cached, because they change quickly.

Value

A tibble with one row per release and condition, or NULL invisibly if the API cannot be reached. The columns are release_id, condition, a factor from best to worst, price and currency. A release without suggestions has no rows.

Restricted Data

Collections, wantlists, usernames and marketplace data, such as prices and collection values, are Restricted Data under the 'Discogs' API Terms of Use. 'Discogs' grants each user a limited, personal licence to access and use them with their own token. They may not be passed on to anyone else or used for commercial purposes, and their use must respect the privacy of their owners. Keep them, and tallies and plots of them, for your own use, and do not publish them. The Terms of Use also forbid using the API to get around the 'Discogs' marketplace.

Examples

dig_price_suggestions(249504)

Check the rate limit

Description

Asks 'Discogs' how many requests are left in the current window. The check is a request itself and counts towards the limit.

Usage

dig_rate_limit()

Details

'Discogs' allows 60 requests a minute with a token and 25 without. Its documentation describes a moving average over a 60 second window. In tests made for tidycrates, the count followed clock minutes and was

current + previous * (1 - seconds / 60)

where current is the number of requests so far in this clock minute, previous the number in the minute before, and seconds the time since this minute began. Requests of one minute therefore fade out over the next, and a burst counts for up to two minutes. Refused requests were counted too.

tidycrates keeps the same count of its own requests. A request is sent at once while the count is 58 or less with a token, or 23 or less without, so up to 59 or 24 requests go out in a minute. Later requests wait until the count has room again, and no longer. If the response headers give another limit, the count may reach two below it. If 'Discogs' reports a higher count, for example because other applications use the same token, the difference is added. Requests are retried after HTTP 429 and 503 responses. A message says how long each wait of a second or more takes; when several items are fetched, the progress bar counts the wait down instead and its ETA includes the waits still to come. The limit only needs checking when other applications share the same token or IP address.

The count uses the clock of your computer. A clock that is off by a second changes it by about one request, which the margin of two covers. A larger error can lead to refused requests until the count reported by 'Discogs' corrects it.

Value

A tibble with one row and the columns limit, used, remaining and authenticated, or NULL invisibly if the API cannot be reached.

Why tidycrates throttles requests itself

httr2 has a throttle of its own, httr2::req_throttle(), but it cannot follow the count of 'Discogs'. Its bucket allows a burst and then refills at a steady rate, and it does not know that a burst counts for up to two minutes. A bucket that allows a full minute of requests at once sends more requests than 'Discogs' allows. They are refused, still counted, and retried after waits of 10 seconds or more, so long batches slow down and can fail. A bucket small enough to stay within the limit either spaces all requests evenly, so every small batch waits about a second for each request, or refills more slowly, so long batches take up to twice as long.

Keeping the same count as 'Discogs' avoids both problems. Requests go out at once whenever 'Discogs' has room, wait only as long as needed when it has none, and are not refused. In a simulation with 0.4 seconds for each request, 46 requests took about 18 seconds this way and about 46 seconds with even spacing, and 300 requests took about as long with both.

Examples

dig_rate_limit()

Get releases

Description

Gets releases from the 'Discogs' database. A release is one particular edition of a recording, such as the 1987 UK 7" single of a song.

Usage

dig_release(id)

Arguments

id

One or more release IDs, as numbers or as codes copied from 'Discogs' such as "r249504" or "[r249504]".

Details

The tracklist, credits, formats, identifiers and companies are kept as list columns of tibbles. dig_tracklist(), dig_credits(), dig_formats(), dig_identifiers() and dig_companies() turn them into one row per item.

Images are left out, because the people who upload them can hold their own copyright. Prices are left out too, because they change quickly and this function can be cached. dig_price_stats() gets them. The uri column links to the release on the 'Discogs' website.

Value

A tibble with one row per release, or NULL invisibly if the API cannot be reached. Several labels, catalogue numbers or formats are separated by semicolons in label, catno and format. genres and styles are list columns of character vectors. have and want give the number of users with the release in their collection or wantlist. The tracklist, credits, formats, identifiers and companies are list columns of tibbles.

See Also

dig_master() and dig_master_versions() for other versions of a release.

Examples

dig_release(249504)

Tally releases

Description

Counts the rows of a tibble returned by tidycrates, such as the copies in a collection or the releases of a label, by genre, style, format, label, artist, role, country, year, decade or month added. Only the columns of x are used, so no requests are sent.

Usage

dig_tally(
  x,
  by = c("genre", "style", "format", "label", "artist", "role", "country", "decade",
    "year", "added"),
  n = 10,
  unique = FALSE
)

Arguments

x

A tibble returned by one of the functions listed in Details.

by

What to count by: "genre", "style", "format", "label", "artist", "role", "country", "decade", "year" or "added", the month a copy was added.

n

The number of values to keep for all but years, decades and months. The rest are counted together as "Other". Inf keeps all values.

unique

If TRUE, each release counts once, however many copies of it there are.

Details

Which values of by work depends on where x comes from:

x from by
dig_collection(), dig_wantlist() genre, style, format, label, artist, decade, year, added
dig_release() genre, style, format, label, artist, country, decade, year, added
dig_master() genre, style, artist, decade, year
dig_artist_releases() format, label, artist, role, decade, year
dig_label_releases() format, artist, decade, year
dig_master_versions() format, label, country, decade, year
dig_search() genre, style, format, label, country, decade, year

A row with several genres, styles, formats or labels counts once for each of them, so the shares can add up to more than 1. Rows without a value, such as releases with an unknown year, are left out.

The lists of dig_artist_releases() and dig_label_releases() give formats as descriptions such as ⁠2x12", Comp⁠. Only the first part is counted, without the number of items, so vinyl is counted by size, for example ⁠12"⁠. dig_search() gives the format of a release followed by its descriptions, and only the format is counted. Master releases in dig_artist_releases() stand for all their versions and have no format or label. For dig_release(), added is the month the release was added to 'Discogs'.

Collections and wantlists have no country, because 'Discogs' does not return it for them. To tally a collection by country, get its releases first with dig_release(collection$release_id). This sends one request for each release.

Tallies of a collection or wantlist are still Restricted Data, see dig_collection().

Value

A tibble with a column named after by, n, the number of rows, and share, the share of all rows. For by = "added", total gives the running number of rows at the end of each month, such as the size of a collection. Years, decades and months are in order, and other values are sorted from most to least common. "Other" counts the rows with at least one value outside the top n. It is called "All other" if one of the values is "Other". NULL is returned invisibly if x is NULL.

Examples

shelf <- tibble::tibble(
  release_id = c(1, 1, 2, 3),
  year = c(1994, 1994, 1998, NA),
  genres = list(c("Electronic", "Pop"), c("Electronic", "Pop"), "Electronic", "Jazz")
)
dig_tally(shelf, "genre")
dig_tally(shelf, "decade")
dig_tally(shelf, "genre", unique = TRUE)


collection <- dig_collection("username", all = TRUE)
dig_tally(collection, "genre")
dig_tally(collection, "added")
dig_tally(dig_label_releases(1, all = TRUE), "decade")

Set the user agent

Description

'Discogs' asks every application to identify itself with a user agent. Requests are sent as ⁠tidycrates/<version> (+https://github.com/mcanzi/tidycrates)⁠ by default. A name set here is placed in front, so requests from your script or application can be told apart.

Usage

dig_user_agent(agent = NULL)

Arguments

agent

The name and version of your application, for example "MyCollectionStats/1.0". NULL returns the current user agent without changing it, and an empty string restores the default.

Value

The user agent, invisibly if agent is given.

Examples

dig_user_agent()

List the wantlist of a user

Description

Lists the releases in the wantlist of a 'Discogs' user. Anyone can read a public wantlist. A private wantlist can only be read with the token of its owner, see dig_auth(). Without a username, the wantlist of the token owner is listed. Wantlists are never cached, so changes show up at once.

Usage

dig_wantlist(
  username = NULL,
  sort = c("added", "artist", "title", "label", "catno", "format", "rating", "year"),
  order = c("asc", "desc"),
  all = FALSE,
  page = 1,
  per_page = 50
)

Arguments

username

A 'Discogs' username, or NULL for the owner of the token set with dig_auth(). Finding the owner takes one request, once per session.

sort

The column to sort by: "added", "artist", "title", "label", "catno", "format", "rating" or "year".

order

The sort order: "asc" or "desc".

all

If TRUE, all pages are fetched and page and per_page are ignored.

page

The page to fetch.

per_page

The number of items per page, from 1 to 100.

Details

The notes that a user writes for each release are left out, because they can be personal.

Value

A tibble with one row per release, or NULL invisibly if the API cannot be reached. The columns are release_id, title, artist, year, label, catno, format, genres and styles as list columns, master_id, rating and date_added. rating is NA if the user gave none.

Restricted Data

Collections, wantlists, usernames and marketplace data, such as prices and collection values, are Restricted Data under the 'Discogs' API Terms of Use. 'Discogs' grants each user a limited, personal licence to access and use them with their own token. They may not be passed on to anyone else or used for commercial purposes, and their use must respect the privacy of their owners. Keep them, and tallies and plots of them, for your own use, and do not publish them. The Terms of Use also forbid using the API to get around the 'Discogs' marketplace.

Examples

dig_wantlist("username", all = TRUE)

Unnest release data

Description

Turns the list columns of dig_release() into tibbles with one row per track, credit, format, identifier or company. Each row keeps the ID of its release.

Usage

dig_tracklist(x)

dig_credits(x)

dig_formats(x)

dig_identifiers(x)

dig_companies(x)

Arguments

x

A tibble returned by dig_release() or, for dig_tracklist(), dig_master(). Release IDs or codes such as "[r249504]" are also accepted and fetched first.

Details

dig_tracklist() also accepts the output of dig_master(). Headings and index tracks are kept with their type, and the tracks of an index follow it. seconds is the duration converted to seconds.

dig_credits() combines the credits of the whole release with those of single tracks. credited_as is the name printed on the release, if it differs from the artist name, and tracks gives the positions a credit applies to.

dig_companies() lists the labels of the release followed by the other companies, such as pressing plants and studios. role says what each company did, and label_id can be passed to dig_label().

Value

A tibble, or NULL invisibly if the API cannot be reached.

Examples

release <- dig_release(249504)
dig_tracklist(release)
dig_credits(release)
dig_formats(release)
dig_identifiers(release)
dig_companies(release)