Closed Bartek532 closed 6 months ago
It's also strange that when I created a folder then deleted it and called getEntriesMetadata
I'm still getting it back, but I shouldn't 🤔
Also when I created folder in the app/device, I can't see it as a result of getEntriesMetadata
which is at least weird.
I don't observe the same behavior you do, but in general these api's aren't documented or stable, so you'll have to check trial and error.
In general, when things get deleted, they get a special parent hash "trash". At least, that's what I see. If that doesn't work, I would try first getting the root entries, and then getting metadata from there, similar to what's shown here.
You should get back deleted things because they're in the trash. Maybe you also deleted it from the trash, although that might be marked in some other way.
I don't know why you don't see created folders. I do, but in general, I'd rely more on getEntries
than getEntriesMetadata
as I'm not sure what they're doing with that newer api.
So is getEntriesMetadata
working fine for you? I tried with getEntries
and seems to be working, but it's taking a lot more time with all promises to fulfill 😕 Any chance for update to newer API?
getEntriesMetadata
seems to work for me, but it may not be updating regularly. Remember, I don't work for reMarkable, I can't change how they handle the requests, just make it slightly easier to do what their requests allow.
If the old api is slow or your purposes, you should try using the cache. The first time you do anything it will be close, but if you persist the cache with cache = await api.getCache()
and them re-initialize with remarkable(token, { initCache = cache })
only the updates files should require refetching, which should speed things up considerably.
Sure, thanks, will try!
Btw, could you please take a look on how I'm currently using this API? Maybe there is something that I could do better to accomplish faster and more reliable action? Thanks in advance!
this looks about right. I considered adding something to make publishing the root hash more convenient, but it quickly involved making my own filesystem wrapper and having an api around that, as well as how to manage collisions, and that ultimately seemed like too much work. Sorry I can't offer more advice!
How could I receive information if documents or collections were deleted or they're in the trash?
Currently, when I call
getEntriesMetadata,
I only receive the following properties:id
,hash
,type
,visibleName
,pinned
, andlastModified
, whiledeleted
andparent
are undefined.Thanks in advance!