-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I get a listing of a shared link? #218
Comments
For now I managed to make a plan with something like this: library(tidyverse)
library(tidyjson)
library(httr)
library(boxr)
library(glue)
result <- GET(glue("https://api.box.com/2.0/folders/1234567890/items"),
add_headers(boxapi='shared_link=https://foo.app.box.com/s/abcdefghijklmnop',
Authorization=glue('Bearer {getOption("boxr.token")$credentials$access_token}')))
# Then process files/folders in the response as a tibble by doing:
tbChildren <- content(result, as='text', encoding='UTF-8') %>%
enter_object(entries) %>%
gather_array() %>%
spread_all() Then I just called this recursively to enumerate all files and compared sha1 against disk to see what got messed up. We don't get a timestamp for comparison so probably couldn't do proper sync with this method but that's not my use case in this instance so I didn't chase that down any more. I also noticed I didn't have permission to download the shared content via the API Anyway, just wanted to report back. Maybe this information can improve the library by, for example, including the ability to |
Thanks for the report back. Glad you found a way to work it. Just so I'm on the same page as you are, your use case needed to expose the Find folder for shared link API? Either with a new boxr function or new argument to |
Sorry for delay, but yes that sums it up. I also needed the Find file for shared link API. |
That sounds like a possible new feature for boxr. Re-opening for visibility and interest to others. |
I want to build something that looks at new content on a /s/ style link.
For example, I can navigate to https://app.box.com/s/abcdefghijklmnop/folder/1234567890 but when I tried
boxr::ls('1234567890')
I was told that "the folder specified does not exist in your account" which is true, but it is publicly accessible so I hoped there would be a way to access it through the API.I think I want something like this https://developer.box.com/reference/get-shared-items--folders/ and the same with files, so I can figure out what is new based on the local content.
Any help would be appreciated. Thanks for this library.
The text was updated successfully, but these errors were encountered: