Rlib: construct SyncRequest

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.

please be mindful of AnkiWeb resources if you are using it and not a custom server.

I planning to use my own custom server. But I keep it mind since an other user can use the software for AnkiWeb.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.