| Title: | Access 'Fortnite Ecosystem' API |
|---|---|
| Description: | Interface for accessing the 'Fortnite Ecosystem' API, allowing users to retrieve island metadata and engagement metrics. The package provides functions to search for 'Fortnite Creative' islands, retrieve detailed metadata about specific islands including titles, descriptions, and tags, and access engagement metrics such as daily active users and play duration. It supports pagination for large result sets and time-series analysis of island performance. The API endpoint is <https://api.fortnite.com/ecosystem/v1>. |
| Authors: | Phillip Black [aut, cre] |
| Maintainer: | Phillip Black <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-12 07:00:34 UTC |
| Source: | https://github.com/econosopher/fortniter |
Create request for Fortnite Ecosystem API
fortnite_request(endpoint = "")fortnite_request(endpoint = "")
endpoint |
API endpoint (appended to base URL) |
An httr2 request object
# Example showing request structure endpoint <- "islands" # This would construct an httr2 request object ## Not run: req <- fortnite_request("islands") ## End(Not run)# Example showing request structure endpoint <- "islands" # This would construct an httr2 request object ## Not run: req <- fortnite_request("islands") ## End(Not run)
Get all islands with pagination support
get_all_islands(max_pages = 10, page_size = 100)get_all_islands(max_pages = 10, page_size = 100)
max_pages |
Maximum number of pages to fetch (default: 10) |
page_size |
Number of islands per page (default: 100) |
A tibble with all island data
# Example showing expected output structure mock_all_islands <- tibble::tibble( code = c("1234-5678-9012", "2345-6789-0123"), title = c("Island 1", "Island 2"), page_fetched = c(1, 1) ) # In practice, this would aggregate results from multiple API pages ## Not run: # Get all islands (up to 1000) all_islands <- get_all_islands() # Get more islands many_islands <- get_all_islands(max_pages = 20) ## End(Not run)# Example showing expected output structure mock_all_islands <- tibble::tibble( code = c("1234-5678-9012", "2345-6789-0123"), title = c("Island 1", "Island 2"), page_fetched = c(1, 1) ) # In practice, this would aggregate results from multiple API pages ## Not run: # Get all islands (up to 1000) all_islands <- get_all_islands() # Get more islands many_islands <- get_all_islands(max_pages = 20) ## End(Not run)
Get specific island metadata
get_island_metadata(code)get_island_metadata(code)
code |
Island code (e.g., "XXXX-XXXX-XXXX") |
A list with detailed island metadata
# Example with mock metadata structure mock_metadata <- list( code = "1234-5678-9012", title = "Mock Island", description = "A test island", tags = c("adventure", "multiplayer") ) # In practice, this would come from the API ## Not run: island <- get_island_metadata("1234-5678-9012") ## End(Not run)# Example with mock metadata structure mock_metadata <- list( code = "1234-5678-9012", title = "Mock Island", description = "A test island", tags = c("adventure", "multiplayer") ) # In practice, this would come from the API ## Not run: island <- get_island_metadata("1234-5678-9012") ## End(Not run)
Get island engagement metrics
get_island_metrics(code, start_date, end_date, interval = "day")get_island_metrics(code, start_date, end_date, interval = "day")
code |
Island code |
start_date |
Start date for metrics (Date or character) |
end_date |
End date for metrics (Date or character) |
interval |
Time interval ("minute", "hour", "day") |
A tibble with engagement metrics
# Example with mock metrics structure mock_metrics <- tibble::tibble( date = as.Date(c("2024-01-01", "2024-01-02")), dau = c(1000, 1200), play_duration = c(45.5, 48.2) ) # In practice, this would come from the API ## Not run: metrics <- get_island_metrics( code = "1234-5678-9012", start_date = Sys.Date() - 7, end_date = Sys.Date(), interval = "day" ) ## End(Not run)# Example with mock metrics structure mock_metrics <- tibble::tibble( date = as.Date(c("2024-01-01", "2024-01-02")), dau = c(1000, 1200), play_duration = c(45.5, 48.2) ) # In practice, this would come from the API ## Not run: metrics <- get_island_metrics( code = "1234-5678-9012", start_date = Sys.Date() - 7, end_date = Sys.Date(), interval = "day" ) ## End(Not run)
Get list of Fortnite Creative islands
get_islands(limit = 50, offset = 0, order_by = "plays", order = "desc")get_islands(limit = 50, offset = 0, order_by = "plays", order = "desc")
limit |
Maximum number of results (default: 50) |
offset |
Number of results to skip |
order_by |
Field to order by ("plays", "lastPlayed", etc.) |
order |
Sort order ("asc" or "desc") |
A tibble with island data
# Example with mock response mock_response <- list( islands = list( list(code = "1234-5678-9012", title = "Mock Island"), list(code = "2345-6789-0123", title = "Test Island") ) ) # In practice, this would come from the API ## Not run: islands <- get_islands(limit = 50) ## End(Not run)# Example with mock response mock_response <- list( islands = list( list(code = "1234-5678-9012", title = "Mock Island"), list(code = "2345-6789-0123", title = "Test Island") ) ) # In practice, this would come from the API ## Not run: islands <- get_islands(limit = 50) ## End(Not run)