I currently try to write an anki client, which does modify anki cards for me, using the sync api and the rlib.
But the sync protocol / the rust api looks very complicated.
Currently I am struggle to construct the anki::sync::request::SyncRequest using the from_data function.
SyncRequest required an session id field, but I have no idea, how to get it.
Also it needs an ip address. But which ip address should be used here?
I guess the data field is the inner type T as utf8 json?
That is not intended to be used directly. col.sync_collection() can be used to initiate a sync, though please be mindful of AnkiWeb resources if you are using it and not a custom server.
Thanks for the fast answer.
Did you mean anki::backend::Backend.sync_collection()?
I will try out this. It is a little bit hard to find out how to use the rlib.