| st_filter | R Documentation |
Thin v1.0.0 facade for building or wrapping Sensor Tower custom-field filter IDs. When criteria are supplied, the function translates them into the legacy custom-fields request structure and creates a server-side filter ID using the existing implementation.
st_filter(
date_from = NULL,
date_to = NULL,
genre = NULL,
monetization = NULL,
publisher = NULL,
sdk = NULL,
custom_fields = NULL,
filter_id = NULL,
combine = c("and", "or"),
auth_token = NULL
)
## S3 method for class 'st_filter'
print(x, ...)
## S3 method for class 'st_filter'
format(x, ...)
## S3 method for class 'st_filter'
as.character(x, ...)
## S3 method for class 'st_filter'
c(..., recursive = FALSE, combine = c("and", "or"))
date_from, date_to |
Optional date bounds for a release-date criterion. |
genre |
Optional character vector of game genres. |
monetization |
Optional monetization criteria. Accept either a character vector such as 'c("free", "iap")' or a named list like 'list(free = TRUE, iap = TRUE)'. |
publisher |
Optional character vector of publisher names. |
sdk |
Optional character vector of SDK names. |
custom_fields |
Optional raw custom-fields specification. Can be a list-of-lists already matching the legacy request format or a named list of field names and values. |
filter_id |
Optional existing 24-character Sensor Tower filter ID to wrap. |
combine |
Logical operator metadata for multi-criterion filters: '"and"' or '"or"'. |
auth_token |
Optional Sensor Tower API token. |
x |
An 'st_filter' object (S3 method argument). |
... |
Additional arguments. For 'c.st_filter()', further 'st_filter' objects to combine; ignored by 'print.st_filter()', 'format.st_filter()', and 'as.character.st_filter()'. |
recursive |
Unused; present for S3 method-signature compatibility with [base::c()]. |
An object of class 'st_filter', implemented as a list with elements: - 'criteria': normalized criteria supplied to 'st_filter()' - 'combine': '"and"' or '"or"' - 'filter_id': the wrapped or created server-side filter ID
## Not run:
st_filter(genre = c("Puzzle", "Strategy"))
st_filter(
date_from = "2024-01-01",
date_to = "2024-12-31",
monetization = c("free", "iap")
)
existing <- st_filter(filter_id = "687df26ac5a19ebcfe817d7f")
as.character(existing)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.