Query published files.

query_files(
  query_type = NULL,
  numperpage = 100L,
  creator_appid = NULL,
  consumer_appid = NULL,
  required_tags = NULL,
  excluded_tags = NULL,
  match_all_tags = FALSE,
  required_flags = NULL,
  omitted_flags = NULL,
  search_text = NULL,
  filetype = NULL,
  child_publishedfileid = NULL,
  days = NULL,
  only_recent_votes = FALSE,
  cache_max_age_seconds = NULL,
  elanguage = 0L,
  total_only = FALSE,
  ids_only = FALSE,
  return = "details",
  playtime_days = NULL,
  strip_bbcode = FALSE,
  desired_revision = NULL,
  paginate = FALSE,
  max_pages = Inf
)

get_published_file(
  publishedfileids,
  return = NULL,
  playtime_days = NULL,
  language = "english",
  appid = NULL,
  strip_bbcode = FALSE,
  desired_revision = NULL
)

get_user_files(
  steamid,
  creator_appid = NULL,
  consumer_appid = NULL,
  shortcutid = NULL,
  numperpage = 100,
  filetype = NULL,
  requiredtags = NULL,
  excludedtags = NULL,
  cache_mag_age_seconds = NULL,
  language = "english",
  excluded_content_descriptors = NULL,
  total_only = FALSE,
  ids_only = FALSE,
  return = NULL,
  playtime_days = NULL,
  desired_revision = NULL
)

Arguments

query_type

How to rank the query. Can be a code defined in EPublishedFileQueryType.

numperpage

Number of results per page, up to a maximum of 100.

creator_appid

AppID to filter by. Only files created by this appID will be returned.

consumer_appid

AppID to filter by. Only files consumed by this appID will be returned.

required_tags

Tags that must be present in the queried files. If match_all_tags is TRUE, then all tags must be present.

excluded_tags

Tags that must not be present in the queried files.

match_all_tags

If TRUE, then all tags in required_tags must be present in the queried files, otherwise only at least one.

required_flags

Flags that must be present in the queried files.

omitted_flags

Flags that must not be present in the queried files.

search_text

Text to match in the file's title or description.

filetype

File types to return. Can be one of the codes in EPublishedFileInfoMatchingFileType.

child_publishedfileid

PublishedfileID that must be referenced by the queried files.

days

If query_type = 3 (ranked by trend), specifies the number of days to get votes for (between 1 and 7 days).

only_recent_votes

If query_type = 3 (ranked by trend), specifies whether result should only include files that have been voted on in the last days days.

cache_max_age_seconds

Maximum file age in seconds. If set, files are allowed to get stale by the amount of time specified.

total_only

If TRUE, only returns the total number of queried files.

ids_only

If TRUE, only returns the queried publishedfileIDs. Takes precedence over the return argument.

return

A character vector specifying the information that should be returned. Can be several of the following: vote_data, tags, kv_tags, previews, children, short_description, for_sale_data, metadata, playtime_stats, details and reactions. details returns a default set of details. If playtime_stats, returns playtime stats for the number of days specified in playtime_days. children returns the publishedfileIDs referenced by the published files. for_sale_data returns pricing information where applicable. short_description replaces the file_description with a short_description field containing a shorter description.

playtime_days

If return includes playtime_stats, specifies the number of days for which to return stats.

strip_bbcode

If TRUE, strips all BB code from descriptions.

desired_revision

Specifies the state of file revision. Can be a code specified in EPublishedFileRevision.

publishedfileid

A vector of publishedfileID of a file to get details for.

Value

query_files

A dataframe containing least the request result code, the publishedfileID and the SteamID of the creator. Depending on the return argument, further details are provided. If total_only = TRUE, returns a length-1 vector containing the total number of queried files. If ids_only, forces the output to return the minimum amount of information (publishedfileIDs and SteamIDs only).

get_published_file

A dataframe with one row containing default details of a published file. Depending on the return argument, further details are provided. Default details are always the minimum amount of information returned.

Examples

# query the first three pages
options(steamr_max_reqs = 3)
query_files()
#> # A tibble: 0 × 0

# return essential details and pricing data
query_files(return = c("details", "for_sale_data"))
#> # A tibble: 0 × 0

# query only for artworks
# an overview of filetypes can be retrieved using:
# EPublishedFileInfoMatchingFileType()
query_files(filetype = 3)
#> # A tibble: 0 × 0

# query only workshop collections
query_files(filetype = 1)
#> # A tibble: 0 × 0

# query all files that were produced by team fortress
query_files(creator_appid = 440)
#> # A tibble: 0 × 0

# get the number of files produced by team fortress
query_files(total_only = TRUE)
#> NULL

# retrieve files published in portuguese language
query_files(language = 4)
#> Error in query_files(language = 4): unused argument (language = 4)