OSRS API
osrs_api_vignette.Rmd
Possible history
values
Possible values of history
are latest,
last90d, all or sample. It’s only possible to
query several items for the latest
option.
bucket_and_whip <- create_item_data(c("bucket", "Abyssal whip"), history = "all")
bucket_and_whip <- create_item_data(c("bucket", "Abyssal whip"), history = "latest")
Extracting information into a useful object
Use the create_item_data
function to extract the item
information and put into a data set. Fx.
item_data <- create_item_data(c("bucket", "Abyssal whip"), history = "all")
Filter the data set
item_data |>
dplyr::filter(rel_day <= 10)
#> # A tibble: 22 × 6
#> item id price rel_day date volume
#> <chr> <chr> <int> <dbl> <date> <int>
#> 1 Abyssal whip 4151 1427376 0 2024-08-08 4029
#> 2 Abyssal whip 4151 1420501 1 2024-08-07 5395
#> 3 Abyssal whip 4151 1420170 2 2024-08-06 8069
#> 4 Abyssal whip 4151 1425946 3 2024-08-05 10896
#> 5 Abyssal whip 4151 1427688 4 2024-08-04 6103
#> 6 Abyssal whip 4151 1432482 5 2024-08-03 8532
#> 7 Abyssal whip 4151 1427638 6 2024-08-02 4836
#> 8 Abyssal whip 4151 1437844 7 2024-08-01 10011
#> 9 Abyssal whip 4151 1403246 8 2024-07-31 8122
#> 10 Abyssal whip 4151 1401991 9 2024-07-30 7231
#> # ℹ 12 more rows