mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00

* Accept iterables as inputs to backend methods * Shift add-on check to backend; use new endpoint The new endpoint will return info on a suitable branch if found, instead of returning all branches. This simplifies the frontend code, and means that you can now drop support for certain versions without it also remotely disabling the add-on for people who are running one of the excluded versions, like in https://forums.ankiweb.net/t/prevent-add-ons-from-being-disabled-remote-stealthily-surreptitiously/33427 * Bump version to 23.09 This changes Anki's version numbering system to year.month.patch, as previously mentioned on https://forums.ankiweb.net/t/use-a-different-versioning-system-semver-perhaps/20046/5 This is shaping up to be a big release, with the introduction of FSRS and image occlusion, and it seems like a good time to be finally updating the version scheme as well. AnkiWeb has been updated to understand the new format, and add-on authors will now specify version compatibility using the full version number, as can be seen here: https://ankiweb.net/shared/info/3918629684 * Shift update check to backend, and tidy up update.py * Use the shared client for sync connections too
49 lines
1.2 KiB
Protocol Buffer
49 lines
1.2 KiB
Protocol Buffer
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
syntax = "proto3";
|
|
|
|
option java_multiple_files = true;
|
|
|
|
package anki.ankiweb;
|
|
|
|
service AnkiwebService {}
|
|
|
|
service BackendAnkiwebService {
|
|
// Fetch info on add-ons from AnkiWeb. A maximum of 25 can be queried at one
|
|
// time. If an add-on doesn't have a branch compatible with the provided
|
|
// version, that add-on will not be included in the returned list.
|
|
rpc GetAddonInfo(GetAddonInfoRequest) returns (GetAddonInfoResponse);
|
|
rpc CheckForUpdate(CheckForUpdateRequest) returns (CheckForUpdateResponse);
|
|
}
|
|
|
|
message GetAddonInfoRequest {
|
|
uint32 client_version = 1;
|
|
repeated uint32 addon_ids = 2;
|
|
}
|
|
|
|
message GetAddonInfoResponse {
|
|
repeated AddonInfo info = 1;
|
|
}
|
|
|
|
message AddonInfo {
|
|
uint32 id = 1;
|
|
int64 modified = 2;
|
|
uint32 min_version = 3;
|
|
uint32 max_version = 4;
|
|
}
|
|
|
|
message CheckForUpdateRequest {
|
|
uint32 version = 1;
|
|
string buildhash = 2;
|
|
string os = 3;
|
|
int64 install_id = 4;
|
|
uint32 last_message_id = 5;
|
|
}
|
|
|
|
message CheckForUpdateResponse {
|
|
optional string new_version = 1;
|
|
int64 current_time = 2;
|
|
optional string message = 3;
|
|
uint32 last_message_id = 4;
|
|
}
|