Coding period Update - Week 6

Repository: GitHub - khuongduy354/joplin-sync-lib
Demo: joplin-sync-lib/src/sample_app at master · khuongduy354/joplin-sync-lib · GitHub

Progress

  • Implemented OCR syncing (pull and push) demo

  • createItems(): now generate timestamp during id generation process, limit to 20 items at max

  • getItemsWithMetadata(): user now can provide an output limit, every fetch is limited to that amount, and can fetch for more using hasMore boolean and next timestamp.

  • Typing: added input output typing for each methods

  • Implement E2E into Sync Library on another branch:
    Sync API can only read E2E setup from remote, similar to the Sync Target initializing step,
    users need to use a Joplin Client to setup, this library can't: receive a password from user, toggle E2E from client side, and mutate server-side E2E setup.It can automatically enable/disable E2E locally in some scenarios, but in some cases, users have to setup manually. More details: Sync API docs

  • Fix bugs: add await item upload in updateItem(), getItem() should only fetch once

Plan

  • Merge E2E integration feat into master branch
  • Add more docs on Synchronization main methods
  • Add unit tests
  • Fix bugs, and refractor code,...

Problems

  • Time setting bug when update item: after updating an item, a it's updated_time is set to a new timestamp. However, maybe due to serialization problem, after set, updated_time value becomes 'Invalid Date'. Meanwhile, createItems() set time works fine.
2 Likes

In your reports please provide a link to your repository so that we can check the code.

The documentation for your project is important - how do you currently create it?

And do you have a demo that makes use of your lib that we could check? (likewise please always link to it in your reports)

I have this post for documenting my project: Sync API docs, I've just added the repository link there.

I haven't updated the docs above yet because the typings are still changing, but it should be in markdown, maybe similar to axios. I see that Joplin documentation website also in markdown, so later I can use that to render if possible