-
-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Currently, upload_tiles has no return and just prints out a message with the upload ID (in case the upload was successful).
Current behavior
The function ends (in case it was successful) with:
message(sprintf("Your upload ID is %s", response$id))The response object (which contains id, progress, complete, etc.) is never returned. This makes it difficult, for instance, to check the upload status programatically.
Suggested fix
The parsed API response could be returned invisibly, so that:
- Existing code that calls
upload_tiles()without assignment is unaffected (the message still prints). - Users who assign the result can pass
response$idtocheck_upload_status().
This could be made by adding invisible(response) at the end of the function.
message(sprintf("Your upload ID is %s", response$id))
invisible(response)Which would allow something like this to work:
res <- mapboxapi::upload_tiles(
shape,
username = "username",
tileset_id = "cities_sao_paulo",
tileset_name = "sao_paulo"
)
mapboxapi::check_upload_status(res$id, "username")Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels