示例#1
0
            protected override async Task <int> OnExecuteAuthenticatedAsync(QBittorrentClient client, CommandLineApplication app, IConsole console)
            {
                var apiVersion = await client.GetApiVersionAsync();

                var categories = apiVersion >= new ApiVersion(2, 1, 1)
                    ? await client.GetCategoriesAsync()
                    : (await client.GetPartialDataAsync()).CategoriesChanged;

                Print(categories.Values);
                return(ExitCodes.Success);
            }