diff --git a/qbittorrent-web-api-gen/groups.txt b/qbittorrent-web-api-gen/groups.txt index 96d8e85..2d6c67a 100644 --- a/qbittorrent-web-api-gen/groups.txt +++ b/qbittorrent-web-api-gen/groups.txt @@ -5,7 +5,7 @@ ApiMethod { name: "login", description: Some( - "Example showing how to login and execute a command that requires authentication using `curl`:\n\n```sh\n$ curl -i --header 'Referer: http://localhost:8080' --data 'username=admin&password=adminadmin' http://localhost:8080/api/v2/auth/login\nHTTP/1.1 200 OK\nContent-Encoding:\nContent-Length: 3\nContent-Type: text/plain; charset=UTF-8\nSet-Cookie: SID=hBc7TxF76ERhvIw0jQQ4LZ7Z1jQUV0tQ; path=/\n$ curl http://localhost:8080/api/v2/torrents/info --cookie \"SID=hBc7TxF76ERhvIw0jQQ4LZ7Z1jQUV0tQ\"\n```\n\nNote: Set `Referer` or `Origin` header to the exact same domain and port as used in the HTTP query `Host` header.", + "Upon success, the response will contain a cookie with your SID. You must supply the cookie whenever you want to perform an operation that requires authentication.\n\nExample showing how to login and execute a command that requires authentication using `curl`:\n\n```sh\n$ curl -i --header 'Referer: http://localhost:8080' --data 'username=admin&password=adminadmin' http://localhost:8080/api/v2/auth/login\nHTTP/1.1 200 OK\nContent-Encoding:\nContent-Length: 3\nContent-Type: text/plain; charset=UTF-8\nSet-Cookie: SID=hBc7TxF76ERhvIw0jQQ4LZ7Z1jQUV0tQ; path=/\n$ curl http://localhost:8080/api/v2/torrents/info --cookie \"SID=hBc7TxF76ERhvIw0jQQ4LZ7Z1jQUV0tQ\"\n```\n\nNote: Set `Referer` or `Origin` header to the exact same domain and port as used in the HTTP query `Host` header.", ), parameters: Some( [ @@ -54,21 +54,27 @@ methods: [ ApiMethod { name: "version", - description: None, + description: Some( + "The response is a string with the application version, e.g. `v4.1.3`", + ), parameters: None, return_type: None, url: "version", }, ApiMethod { name: "webapiVersion", - description: None, + description: Some( + "The response is a string with the WebAPI version, e.g. `2.0`", + ), parameters: None, return_type: None, url: "webapiVersion", }, ApiMethod { name: "buildInfo", - description: None, + description: Some( + "The response is a JSON object containing the following fields", + ), parameters: None, return_type: Some( ReturnType { @@ -164,7 +170,7 @@ ApiMethod { name: "preferences", description: Some( - "Possible fields:\n\nPossible values of `scan_dirs`:\n\nPossible values of `scheduler_days`:\n\nPossible values of `encryption`:\n\nNB: the first options allows you to use both encrypted and unencrypted connections (this is the default); other options are mutually exclusive: e.g. by forcing encryption on you won't be able to use unencrypted connections and vice versa.\n\nPossible values of `proxy_type`:\n\nPossible values of `dyndns_service`:\n\nPossible values of `max_ratio_act`:\n\nPossible values of `bittorrent_protocol`:\n\nPossible values of `upload_choking_algorithm`:\n\nPossible values of `upload_slots_behavior`:\n\nPossible values of `utp_tcp_mixed_mode`:\n\nExample:\n\n```JSON\n{\n \"add_trackers\": \"\",\n \"add_trackers_enabled\": false,\n \"alt_dl_limit\": 10240,\n \"alt_up_limit\": 10240,\n \"alternative_webui_enabled\": false,\n \"alternative_webui_path\": \"/home/user/Documents/qbit-webui\",\n \"announce_ip\": \"\",\n \"announce_to_all_tiers\": true,\n \"announce_to_all_trackers\": false,\n \"anonymous_mode\": false,\n \"async_io_threads\": 4,\n \"auto_delete_mode\": 0,\n \"auto_tmm_enabled\": false,\n \"autorun_enabled\": false,\n \"autorun_program\": \"\",\n \"banned_IPs\": \"\",\n \"bittorrent_protocol\": 0,\n \"bypass_auth_subnet_whitelist\": \"\",\n \"bypass_auth_subnet_whitelist_enabled\": false,\n \"bypass_local_auth\": false,\n \"category_changed_tmm_enabled\": false,\n \"checking_memory_use\": 32,\n \"create_subfolder_enabled\": true,\n \"current_interface_address\": \"\",\n \"current_network_interface\": \"\",\n \"dht\": true,\n \"disk_cache\": -1,\n \"disk_cache_ttl\": 60,\n \"dl_limit\": 0,\n \"dont_count_slow_torrents\": false,\n \"dyndns_domain\": \"changeme.dyndns.org\",\n \"dyndns_enabled\": false,\n \"dyndns_password\": \"\",\n \"dyndns_service\": 0,\n \"dyndns_username\": \"\",\n \"embedded_tracker_port\": 9000,\n \"enable_coalesce_read_write\": false,\n \"enable_embedded_tracker\": false,\n \"enable_multi_connections_from_same_ip\": false,\n \"enable_os_cache\": true,\n \"enable_piece_extent_affinity\": false,\n \"enable_upload_suggestions\": false,\n \"encryption\": 0,\n \"export_dir\": \"/home/user/Downloads/all\",\n \"export_dir_fin\": \"/home/user/Downloads/completed\",\n \"file_pool_size\": 40,\n \"incomplete_files_ext\": false,\n \"ip_filter_enabled\": false,\n \"ip_filter_path\": \"\",\n \"ip_filter_trackers\": false,\n \"limit_lan_peers\": true,\n \"limit_tcp_overhead\": false,\n \"limit_utp_rate\": true,\n \"listen_port\": 58925,\n \"locale\": \"en\",\n \"lsd\": true,\n \"mail_notification_auth_enabled\": false,\n \"mail_notification_email\": \"\",\n \"mail_notification_enabled\": false,\n \"mail_notification_password\": \"\",\n \"mail_notification_sender\": \"qBittorrent_notification@example.com\",\n \"mail_notification_smtp\": \"smtp.changeme.com\",\n \"mail_notification_ssl_enabled\": false,\n \"mail_notification_username\": \"\",\n \"max_active_downloads\": 3,\n \"max_active_torrents\": 5,\n \"max_active_uploads\": 3,\n \"max_connec\": 500,\n \"max_connec_per_torrent\": 100,\n \"max_ratio\": -1,\n \"max_ratio_act\": 0,\n \"max_ratio_enabled\": false,\n \"max_seeding_time\": -1,\n \"max_seeding_time_enabled\": false,\n \"max_uploads\": -1,\n \"max_uploads_per_torrent\": -1,\n \"outgoing_ports_max\": 0,\n \"outgoing_ports_min\": 0,\n \"pex\": true,\n \"preallocate_all\": false,\n \"proxy_auth_enabled\": false,\n \"proxy_ip\": \"0.0.0.0\",\n \"proxy_password\": \"\",\n \"proxy_peer_connections\": false,\n \"proxy_port\": 8080,\n \"proxy_torrents_only\": false,\n \"proxy_type\": 0,\n \"proxy_username\": \"\",\n \"queueing_enabled\": false,\n \"random_port\": false,\n \"recheck_completed_torrents\": false,\n \"resolve_peer_countries\": true,\n \"rss_auto_downloading_enabled\":true,\n \"rss_download_repack_proper_episodes\":true,\n \"rss_max_articles_per_feed\":50,\n \"rss_processing_enabled\":true,\n \"rss_refresh_interval\":30,\n \"rss_smart_episode_filters\":\"s(\\\\d+)e(\\\\d+)\\n(\\\\d+)x(\\\\d+)\\n(\\\\d{4}[.\\\\-]\\\\d{1,2}[.\\\\-]\\\\d{1,2})\",\n \"save_path\": \"/home/user/Downloads/\",\n \"save_path_changed_tmm_enabled\": false,\n \"save_resume_data_interval\": 60,\n \"scan_dirs\":\n {\n \"/home/user/Downloads/incoming/games\": 0,\n \"/home/user/Downloads/incoming/movies\": 1,\n },\n \"schedule_from_hour\": 8,\n \"schedule_from_min\": 0,\n \"schedule_to_hour\": 20,\n \"schedule_to_min\": 0,\n \"scheduler_days\": 0,\n \"scheduler_enabled\": false,\n \"send_buffer_low_watermark\": 10,\n \"send_buffer_watermark\": 500,\n \"send_buffer_watermark_factor\": 50,\n \"slow_torrent_dl_rate_threshold\": 2,\n \"slow_torrent_inactive_timer\": 60,\n \"slow_torrent_ul_rate_threshold\": 2,\n \"socket_backlog_size\": 30,\n \"start_paused_enabled\": false,\n \"stop_tracker_timeout\": 1,\n \"temp_path\": \"/home/user/Downloads/temp\",\n \"temp_path_enabled\": false,\n \"torrent_changed_tmm_enabled\": true,\n \"up_limit\": 0,\n \"upload_choking_algorithm\": 1,\n \"upload_slots_behavior\": 0,\n \"upnp\": true,\n \"use_https\": false,\n \"utp_tcp_mixed_mode\": 0,\n \"web_ui_address\": \"*\",\n \"web_ui_ban_duration\": 3600,\n \"web_ui_clickjacking_protection_enabled\": true,\n \"web_ui_csrf_protection_enabled\": true,\n \"web_ui_custom_http_headers\": \"\",\n \"web_ui_domain_list\": \"*\",\n \"web_ui_host_header_validation_enabled\": true,\n \"web_ui_https_cert_path\": \"\",\n \"web_ui_https_key_path\": \"\",\n \"web_ui_max_auth_fail_count\": 5,\n \"web_ui_port\": 8080,\n \"web_ui_secure_cookie_enabled\": true,\n \"web_ui_session_timeout\": 3600,\n \"web_ui_upnp\": false,\n \"web_ui_use_custom_http_headers_enabled\": false,\n \"web_ui_username\": \"admin\"\n}\n```", + "The response is a JSON object with several fields (key-value) pairs representing the application's settings. The contents may vary depending on which settings are present in qBittorrent.ini.\n\nPossible fields:\n\n\nPossible values of `scan_dirs`:\n\n\nPossible values of `scheduler_days`:\n\n\nPossible values of `encryption`:\n\n\nNB: the first options allows you to use both encrypted and unencrypted connections (this is the default); other options are mutually exclusive: e.g. by forcing encryption on you won't be able to use unencrypted connections and vice versa.\n\nPossible values of `proxy_type`:\n\n\nPossible values of `dyndns_service`:\n\n\nPossible values of `max_ratio_act`:\n\n\nPossible values of `bittorrent_protocol`:\n\n\nPossible values of `upload_choking_algorithm`:\n\n\nPossible values of `upload_slots_behavior`:\n\n\nPossible values of `utp_tcp_mixed_mode`:\n\n\nExample:\n\n```JSON\n{\n \"add_trackers\": \"\",\n \"add_trackers_enabled\": false,\n \"alt_dl_limit\": 10240,\n \"alt_up_limit\": 10240,\n \"alternative_webui_enabled\": false,\n \"alternative_webui_path\": \"/home/user/Documents/qbit-webui\",\n \"announce_ip\": \"\",\n \"announce_to_all_tiers\": true,\n \"announce_to_all_trackers\": false,\n \"anonymous_mode\": false,\n \"async_io_threads\": 4,\n \"auto_delete_mode\": 0,\n \"auto_tmm_enabled\": false,\n \"autorun_enabled\": false,\n \"autorun_program\": \"\",\n \"banned_IPs\": \"\",\n \"bittorrent_protocol\": 0,\n \"bypass_auth_subnet_whitelist\": \"\",\n \"bypass_auth_subnet_whitelist_enabled\": false,\n \"bypass_local_auth\": false,\n \"category_changed_tmm_enabled\": false,\n \"checking_memory_use\": 32,\n \"create_subfolder_enabled\": true,\n \"current_interface_address\": \"\",\n \"current_network_interface\": \"\",\n \"dht\": true,\n \"disk_cache\": -1,\n \"disk_cache_ttl\": 60,\n \"dl_limit\": 0,\n \"dont_count_slow_torrents\": false,\n \"dyndns_domain\": \"changeme.dyndns.org\",\n \"dyndns_enabled\": false,\n \"dyndns_password\": \"\",\n \"dyndns_service\": 0,\n \"dyndns_username\": \"\",\n \"embedded_tracker_port\": 9000,\n \"enable_coalesce_read_write\": false,\n \"enable_embedded_tracker\": false,\n \"enable_multi_connections_from_same_ip\": false,\n \"enable_os_cache\": true,\n \"enable_piece_extent_affinity\": false,\n \"enable_upload_suggestions\": false,\n \"encryption\": 0,\n \"export_dir\": \"/home/user/Downloads/all\",\n \"export_dir_fin\": \"/home/user/Downloads/completed\",\n \"file_pool_size\": 40,\n \"incomplete_files_ext\": false,\n \"ip_filter_enabled\": false,\n \"ip_filter_path\": \"\",\n \"ip_filter_trackers\": false,\n \"limit_lan_peers\": true,\n \"limit_tcp_overhead\": false,\n \"limit_utp_rate\": true,\n \"listen_port\": 58925,\n \"locale\": \"en\",\n \"lsd\": true,\n \"mail_notification_auth_enabled\": false,\n \"mail_notification_email\": \"\",\n \"mail_notification_enabled\": false,\n \"mail_notification_password\": \"\",\n \"mail_notification_sender\": \"qBittorrent_notification@example.com\",\n \"mail_notification_smtp\": \"smtp.changeme.com\",\n \"mail_notification_ssl_enabled\": false,\n \"mail_notification_username\": \"\",\n \"max_active_downloads\": 3,\n \"max_active_torrents\": 5,\n \"max_active_uploads\": 3,\n \"max_connec\": 500,\n \"max_connec_per_torrent\": 100,\n \"max_ratio\": -1,\n \"max_ratio_act\": 0,\n \"max_ratio_enabled\": false,\n \"max_seeding_time\": -1,\n \"max_seeding_time_enabled\": false,\n \"max_uploads\": -1,\n \"max_uploads_per_torrent\": -1,\n \"outgoing_ports_max\": 0,\n \"outgoing_ports_min\": 0,\n \"pex\": true,\n \"preallocate_all\": false,\n \"proxy_auth_enabled\": false,\n \"proxy_ip\": \"0.0.0.0\",\n \"proxy_password\": \"\",\n \"proxy_peer_connections\": false,\n \"proxy_port\": 8080,\n \"proxy_torrents_only\": false,\n \"proxy_type\": 0,\n \"proxy_username\": \"\",\n \"queueing_enabled\": false,\n \"random_port\": false,\n \"recheck_completed_torrents\": false,\n \"resolve_peer_countries\": true,\n \"rss_auto_downloading_enabled\":true,\n \"rss_download_repack_proper_episodes\":true,\n \"rss_max_articles_per_feed\":50,\n \"rss_processing_enabled\":true,\n \"rss_refresh_interval\":30,\n \"rss_smart_episode_filters\":\"s(\\\\d+)e(\\\\d+)\\n(\\\\d+)x(\\\\d+)\\n(\\\\d{4}[.\\\\-]\\\\d{1,2}[.\\\\-]\\\\d{1,2})\",\n \"save_path\": \"/home/user/Downloads/\",\n \"save_path_changed_tmm_enabled\": false,\n \"save_resume_data_interval\": 60,\n \"scan_dirs\":\n {\n \"/home/user/Downloads/incoming/games\": 0,\n \"/home/user/Downloads/incoming/movies\": 1,\n },\n \"schedule_from_hour\": 8,\n \"schedule_from_min\": 0,\n \"schedule_to_hour\": 20,\n \"schedule_to_min\": 0,\n \"scheduler_days\": 0,\n \"scheduler_enabled\": false,\n \"send_buffer_low_watermark\": 10,\n \"send_buffer_watermark\": 500,\n \"send_buffer_watermark_factor\": 50,\n \"slow_torrent_dl_rate_threshold\": 2,\n \"slow_torrent_inactive_timer\": 60,\n \"slow_torrent_ul_rate_threshold\": 2,\n \"socket_backlog_size\": 30,\n \"start_paused_enabled\": false,\n \"stop_tracker_timeout\": 1,\n \"temp_path\": \"/home/user/Downloads/temp\",\n \"temp_path_enabled\": false,\n \"torrent_changed_tmm_enabled\": true,\n \"up_limit\": 0,\n \"upload_choking_algorithm\": 1,\n \"upload_slots_behavior\": 0,\n \"upnp\": true,\n \"use_https\": false,\n \"utp_tcp_mixed_mode\": 0,\n \"web_ui_address\": \"*\",\n \"web_ui_ban_duration\": 3600,\n \"web_ui_clickjacking_protection_enabled\": true,\n \"web_ui_csrf_protection_enabled\": true,\n \"web_ui_custom_http_headers\": \"\",\n \"web_ui_domain_list\": \"*\",\n \"web_ui_host_header_validation_enabled\": true,\n \"web_ui_https_cert_path\": \"\",\n \"web_ui_https_key_path\": \"\",\n \"web_ui_max_auth_fail_count\": 5,\n \"web_ui_port\": 8080,\n \"web_ui_secure_cookie_enabled\": true,\n \"web_ui_session_timeout\": 3600,\n \"web_ui_upnp\": false,\n \"web_ui_use_custom_http_headers_enabled\": false,\n \"web_ui_username\": \"admin\"\n}\n```", ), parameters: None, return_type: Some( @@ -2571,7 +2577,9 @@ }, ApiMethod { name: "defaultSavePath", - description: None, + description: Some( + "The response is a string with the default save path, e.g. `C:/Users/Dayman/Downloads`.", + ), parameters: None, return_type: None, url: "defaultSavePath", @@ -2588,7 +2596,7 @@ ApiMethod { name: "main", description: Some( - "Each element of the array has the following properties:\n\nExample:\n\n```JSON\n[\n {\n \"id\":0,\n \"message\":\"qBittorrent v3.4.0 started\",\n \"timestamp\":1507969127860,\n \"type\":1\n },\n {\n \"id\":1,\n \"message\":\"qBittorrent is trying to listen on any interface port: 19036\",\n \"timestamp\":1507969127869,\n \"type\":2\n },\n {\n \"id\":2,\n \"message\":\"Peer ID: -qB3400-\",\n \"timestamp\":1507969127870,\n \"type\":1\n },\n {\n \"id\":3,\n \"message\":\"HTTP User-Agent is 'qBittorrent/3.4.0'\",\n \"timestamp\":1507969127870,\n \"type\":1\n },\n {\n \"id\":4,\n \"message\":\"DHT support [ON]\",\n \"timestamp\":1507969127871,\n \"type\":2\n },\n {\n \"id\":5,\n \"message\":\"Local Peer Discovery support [ON]\",\n \"timestamp\":1507969127871,\n \"type\":2\n },\n {\n \"id\":6,\n \"message\":\"PeX support [ON]\",\n \"timestamp\":1507969127871,\n \"type\":2\n },\n {\n \"id\":7,\n \"message\":\"Anonymous mode [OFF]\",\n \"timestamp\":1507969127871,\n \"type\":2\n },\n {\n \"id\":8,\n \"message\":\"Encryption support [ON]\",\n \"timestamp\":1507969127871,\n \"type\":2\n },\n {\n \"id\":9,\n \"message\":\"Embedded Tracker [OFF]\",\n \"timestamp\":1507969127871,\n \"type\":2\n },\n {\n \"id\":10,\n \"message\":\"UPnP / NAT-PMP support [ON]\",\n \"timestamp\":1507969127873,\n \"type\":2\n },\n {\n \"id\":11,\n \"message\":\"Web UI: Now listening on port 8080\",\n \"timestamp\":1507969127883,\n \"type\":1\n },\n {\n \"id\":12,\n \"message\":\"Options were saved successfully.\",\n \"timestamp\":1507969128055,\n \"type\":1\n },\n {\n \"id\":13,\n \"message\":\"qBittorrent is successfully listening on interface :: port: TCP/19036\",\n \"timestamp\":1507969128270,\n \"type\":2\n },\n {\n \"id\":14,\n \"message\":\"qBittorrent is successfully listening on interface 0.0.0.0 port: TCP/19036\",\n \"timestamp\":1507969128271,\n \"type\":2\n },\n {\n \"id\":15,\n \"message\":\"qBittorrent is successfully listening on interface 0.0.0.0 port: UDP/19036\",\n \"timestamp\":1507969128272,\n \"type\":2\n }\n]\n```", + "The response is a JSON array in which each element is an entry of the log.\n\nEach element of the array has the following properties:\n\n\nExample:\n\n```JSON\n[\n {\n \"id\":0,\n \"message\":\"qBittorrent v3.4.0 started\",\n \"timestamp\":1507969127860,\n \"type\":1\n },\n {\n \"id\":1,\n \"message\":\"qBittorrent is trying to listen on any interface port: 19036\",\n \"timestamp\":1507969127869,\n \"type\":2\n },\n {\n \"id\":2,\n \"message\":\"Peer ID: -qB3400-\",\n \"timestamp\":1507969127870,\n \"type\":1\n },\n {\n \"id\":3,\n \"message\":\"HTTP User-Agent is 'qBittorrent/3.4.0'\",\n \"timestamp\":1507969127870,\n \"type\":1\n },\n {\n \"id\":4,\n \"message\":\"DHT support [ON]\",\n \"timestamp\":1507969127871,\n \"type\":2\n },\n {\n \"id\":5,\n \"message\":\"Local Peer Discovery support [ON]\",\n \"timestamp\":1507969127871,\n \"type\":2\n },\n {\n \"id\":6,\n \"message\":\"PeX support [ON]\",\n \"timestamp\":1507969127871,\n \"type\":2\n },\n {\n \"id\":7,\n \"message\":\"Anonymous mode [OFF]\",\n \"timestamp\":1507969127871,\n \"type\":2\n },\n {\n \"id\":8,\n \"message\":\"Encryption support [ON]\",\n \"timestamp\":1507969127871,\n \"type\":2\n },\n {\n \"id\":9,\n \"message\":\"Embedded Tracker [OFF]\",\n \"timestamp\":1507969127871,\n \"type\":2\n },\n {\n \"id\":10,\n \"message\":\"UPnP / NAT-PMP support [ON]\",\n \"timestamp\":1507969127873,\n \"type\":2\n },\n {\n \"id\":11,\n \"message\":\"Web UI: Now listening on port 8080\",\n \"timestamp\":1507969127883,\n \"type\":1\n },\n {\n \"id\":12,\n \"message\":\"Options were saved successfully.\",\n \"timestamp\":1507969128055,\n \"type\":1\n },\n {\n \"id\":13,\n \"message\":\"qBittorrent is successfully listening on interface :: port: TCP/19036\",\n \"timestamp\":1507969128270,\n \"type\":2\n },\n {\n \"id\":14,\n \"message\":\"qBittorrent is successfully listening on interface 0.0.0.0 port: TCP/19036\",\n \"timestamp\":1507969128271,\n \"type\":2\n },\n {\n \"id\":15,\n \"message\":\"qBittorrent is successfully listening on interface 0.0.0.0 port: UDP/19036\",\n \"timestamp\":1507969128272,\n \"type\":2\n }\n]\n```", ), parameters: Some( [ @@ -2720,7 +2728,9 @@ }, ApiMethod { name: "peers", - description: None, + description: Some( + "The response a JSON array. Each element of the array of objects (each object is the information relative to a peer) containing the following fields", + ), parameters: Some( [ Number( @@ -2751,7 +2761,7 @@ ApiMethod { name: "maindata", description: Some( - "Example:\n\n```JSON\n{\n \"rid\":15,\n \"torrents\":\n {\n \"8c212779b4abde7c6bc608063a0d008b7e40ce32\":\n {\n \"state\":\"pausedUP\"\n }\n }\n}\n```", + "The response is a JSON object with the following possible fields\n\n\nExample:\n\n```JSON\n{\n \"rid\":15,\n \"torrents\":\n {\n \"8c212779b4abde7c6bc608063a0d008b7e40ce32\":\n {\n \"state\":\"pausedUP\"\n }\n }\n}\n```", ), parameters: Some( [ @@ -2914,7 +2924,9 @@ }, ApiMethod { name: "torrentPeers", - description: None, + description: Some( + "The response is TODO", + ), parameters: Some( [ String( @@ -2956,7 +2968,7 @@ ApiMethod { name: "info", description: Some( - "In addition to the above in partial data requests (see [Get partial data](#get-partial-data) for more info):\n\nPossible values of `connection_status`:\n\nExample:\n\n```JSON\n{\n \"connection_status\":\"connected\",\n \"dht_nodes\":386,\n \"dl_info_data\":681521119,\n \"dl_info_speed\":0,\n \"dl_rate_limit\":0,\n \"up_info_data\":10747904,\n \"up_info_speed\":0,\n \"up_rate_limit\":1048576\n}\n```", + "The response is a JSON object with the following fields\n\n\nIn addition to the above in partial data requests (see [Get partial data](#get-partial-data) for more info):\n\n\nPossible values of `connection_status`:\n\n\nExample:\n\n```JSON\n{\n \"connection_status\":\"connected\",\n \"dht_nodes\":386,\n \"dl_info_data\":681521119,\n \"dl_info_speed\":0,\n \"dl_rate_limit\":0,\n \"up_info_data\":10747904,\n \"up_info_speed\":0,\n \"up_rate_limit\":1048576\n}\n```", ), parameters: None, return_type: Some( @@ -3107,7 +3119,9 @@ }, ApiMethod { name: "speedLimitsMode", - description: None, + description: Some( + "The response is `1` if alternative speed limits are enabled, `0` otherwise.", + ), parameters: None, return_type: None, url: "speedLimitsMode", @@ -3121,7 +3135,9 @@ }, ApiMethod { name: "downloadLimit", - description: None, + description: Some( + "The response is the value of current global download speed limit in bytes/second; this value will be zero if no limit is applied.", + ), parameters: None, return_type: None, url: "downloadLimit", @@ -3149,7 +3165,9 @@ }, ApiMethod { name: "uploadLimit", - description: None, + description: Some( + "The response is the value of current global upload speed limit in bytes/second; this value will be zero if no limit is applied.", + ), parameters: None, return_type: None, url: "uploadLimit", @@ -3208,7 +3226,7 @@ ApiMethod { name: "info", description: Some( - "Possible values of `state`:\n\nExample:\n\n```JSON\n[\n {\n \"dlspeed\":9681262,\n \"eta\":87,\n \"f_l_piece_prio\":false,\n \"force_start\":false,\n \"hash\":\"8c212779b4abde7c6bc608063a0d008b7e40ce32\",\n \"category\":\"\",\n \"tags\": \"\",\n \"name\":\"debian-8.1.0-amd64-CD-1.iso\",\n \"num_complete\":-1,\n \"num_incomplete\":-1,\n \"num_leechs\":2,\n \"num_seeds\":54,\n \"priority\":1,\n \"progress\":0.16108787059783936,\n \"ratio\":0,\n \"seq_dl\":false,\n \"size\":657457152,\n \"state\":\"downloading\",\n \"super_seeding\":false,\n \"upspeed\":0\n },\n {\n another_torrent_info\n }\n]\n```", + "The response is a JSON array with the following fields\n\n\nPossible values of `state`:\n\n\nExample:\n\n```JSON\n[\n {\n \"dlspeed\":9681262,\n \"eta\":87,\n \"f_l_piece_prio\":false,\n \"force_start\":false,\n \"hash\":\"8c212779b4abde7c6bc608063a0d008b7e40ce32\",\n \"category\":\"\",\n \"tags\": \"\",\n \"name\":\"debian-8.1.0-amd64-CD-1.iso\",\n \"num_complete\":-1,\n \"num_incomplete\":-1,\n \"num_leechs\":2,\n \"num_seeds\":54,\n \"priority\":1,\n \"progress\":0.16108787059783936,\n \"ratio\":0,\n \"seq_dl\":false,\n \"size\":657457152,\n \"state\":\"downloading\",\n \"super_seeding\":false,\n \"upspeed\":0\n },\n {\n another_torrent_info\n }\n]\n```", ), parameters: Some( [ @@ -4070,7 +4088,7 @@ ApiMethod { name: "properties", description: Some( - "- empty, if the torrent hash is invalid\n- otherwise, a JSON object with the following fields\n\nNB: `-1` is returned if the type of the property is integer but its value is not known.\n\nExample:\n\n```JSON\n{\n \"addition_date\":1438429165,\n \"comment\":\"\\\"Debian CD from cdimage.debian.org\\\"\",\n \"completion_date\":1438429234,\n \"created_by\":\"\",\n \"creation_date\":1433605214,\n \"dl_limit\":-1,\n \"dl_speed\":0,\n \"dl_speed_avg\":9736015,\n \"eta\":8640000,\n \"last_seen\":1438430354,\n \"nb_connections\":3,\n \"nb_connections_limit\":250,\n \"peers\":1,\n \"peers_total\":89,\n \"piece_size\":524288,\n \"pieces_have\":1254,\n \"pieces_num\":1254,\n \"reannounce\":672,\n \"save_path\":\"/Downloads/debian-8.1.0-amd64-CD-1.iso\",\n \"seeding_time\":1128,\n \"seeds\":1,\n \"seeds_total\":254,\n \"share_ratio\":0.00072121022562178299,\n \"time_elapsed\":1197,\n \"total_downloaded\":681521119,\n \"total_downloaded_session\":681521119,\n \"total_size\":657457152,\n \"total_uploaded\":491520,\n \"total_uploaded_session\":491520,\n \"total_wasted\":23481724,\n \"up_limit\":-1,\n \"up_speed\":0,\n \"up_speed_avg\":410\n}\n```", + "The response is:\n\n- empty, if the torrent hash is invalid\n- otherwise, a JSON object with the following fields\n\n\nNB: `-1` is returned if the type of the property is integer but its value is not known.\n\nExample:\n\n```JSON\n{\n \"addition_date\":1438429165,\n \"comment\":\"\\\"Debian CD from cdimage.debian.org\\\"\",\n \"completion_date\":1438429234,\n \"created_by\":\"\",\n \"creation_date\":1433605214,\n \"dl_limit\":-1,\n \"dl_speed\":0,\n \"dl_speed_avg\":9736015,\n \"eta\":8640000,\n \"last_seen\":1438430354,\n \"nb_connections\":3,\n \"nb_connections_limit\":250,\n \"peers\":1,\n \"peers_total\":89,\n \"piece_size\":524288,\n \"pieces_have\":1254,\n \"pieces_num\":1254,\n \"reannounce\":672,\n \"save_path\":\"/Downloads/debian-8.1.0-amd64-CD-1.iso\",\n \"seeding_time\":1128,\n \"seeds\":1,\n \"seeds_total\":254,\n \"share_ratio\":0.00072121022562178299,\n \"time_elapsed\":1197,\n \"total_downloaded\":681521119,\n \"total_downloaded_session\":681521119,\n \"total_size\":657457152,\n \"total_uploaded\":491520,\n \"total_uploaded_session\":491520,\n \"total_wasted\":23481724,\n \"up_limit\":-1,\n \"up_speed\":0,\n \"up_speed_avg\":410\n}\n```", ), parameters: Some( [ @@ -4093,7 +4111,7 @@ ApiMethod { name: "trackers", description: Some( - "Possible values of `status`:\n\nExample:\n\n```JSON\n[\n {\n \"msg\":\"\",\n \"num_peers\":100,\n \"status\":2,\n \"url\":\"http://bttracker.debian.org:6969/announce\"\n },\n {\n another_tracker_info\n }\n]\n```", + "The response is a JSON array, where each element contains info about one tracker, with the following fields\n\n\nPossible values of `status`:\n\n\nExample:\n\n```JSON\n[\n {\n \"msg\":\"\",\n \"num_peers\":100,\n \"status\":2,\n \"url\":\"http://bttracker.debian.org:6969/announce\"\n },\n {\n another_tracker_info\n }\n]\n```", ), parameters: Some( [ @@ -4267,7 +4285,7 @@ ApiMethod { name: "webseeds", description: Some( - "Example:\n\n```JSON\n[\n {\n \"url\":\"http://some_url/\"\n },\n {\n \"url\":\"http://some_other_url/\"\n }\n]\n```", + "The response is a JSON array, where each element is information about one webseed, with the following fields\n\n\nExample:\n\n```JSON\n[\n {\n \"url\":\"http://some_url/\"\n },\n {\n \"url\":\"http://some_other_url/\"\n }\n]\n```", ), parameters: Some( [ @@ -4311,7 +4329,7 @@ ApiMethod { name: "files", description: Some( - "- empty, if the torrent hash is invalid\n- otherwise, a JSON array, where each element contains info about one file, with the following fields\n\nPossible values of `priority`:\n\nExample:\n\n```JSON\n\n[\n {\n \"index\":0,\n \"is_seed\":false,\n \"name\":\"debian-8.1.0-amd64-CD-1.iso\",\n \"piece_range\":[0,1253],\n \"priority\":1,\n \"progress\":0,\n \"size\":657457152,\n \"availability\":0.5,\n }\n]\n```", + "The response is:\n\n- empty, if the torrent hash is invalid\n- otherwise, a JSON array, where each element contains info about one file, with the following fields\n\n\nPossible values of `priority`:\n\n\nExample:\n\n```JSON\n\n[\n {\n \"index\":0,\n \"is_seed\":false,\n \"name\":\"debian-8.1.0-amd64-CD-1.iso\",\n \"piece_range\":[0,1253],\n \"priority\":1,\n \"progress\":0,\n \"size\":657457152,\n \"availability\":0.5,\n }\n]\n```", ), parameters: Some( [ @@ -4345,7 +4363,7 @@ ApiMethod { name: "pieceStates", description: Some( - "- empty, if the torrent hash is invalid\n- otherwise, an array of states (integers) of all pieces (in order) of a specific torrent.\n\nValue meanings are defined as below:\n\nExample:\n\n```JSON\n[0,0,2,1,0,0,2,1]\n```", + "The response is:\n\n- empty, if the torrent hash is invalid\n- otherwise, an array of states (integers) of all pieces (in order) of a specific torrent.\n\nValue meanings are defined as below:\n\n\nExample:\n\n```JSON\n[0,0,2,1,0,0,2,1]\n```", ), parameters: Some( [ @@ -4368,7 +4386,7 @@ ApiMethod { name: "pieceHashes", description: Some( - "- empty, if the torrent hash is invalid\n- otherwise, an array of hashes (strings) of all pieces (in order) of a specific torrent.\n\nExample:\n\n```JSON\n[\"54eddd830a5b58480a6143d616a97e3a6c23c439\",\"f8a99d225aa4241db100f88407fc3bdaead583ab\",\"928fb615b9bd4dd8f9e9022552c8f8f37ef76f58\"]\n```", + "The response is:\n\n- empty, if the torrent hash is invalid\n- otherwise, an array of hashes (strings) of all pieces (in order) of a specific torrent.\n\nExample:\n\n```JSON\n[\"54eddd830a5b58480a6143d616a97e3a6c23c439\",\"f8a99d225aa4241db100f88407fc3bdaead583ab\",\"928fb615b9bd4dd8f9e9022552c8f8f37ef76f58\"]\n```", ), parameters: Some( [ @@ -5481,7 +5499,7 @@ ApiMethod { name: "start", description: Some( - "Example:\n\n```JSON\n{\n \"id\": 12345\n}\n```", + "The response is a JSON object with the following fields\n\n\nExample:\n\n```JSON\n{\n \"id\": 12345\n}\n```", ), parameters: Some( [ @@ -5568,7 +5586,7 @@ ApiMethod { name: "status", description: Some( - "Example:\n\n```JSON\n[\n {\n \"id\": 12345,\n \"status\": \"Running\",\n \"total\": 170\n }\n]\n```", + "The response is a JSON array of objects containing the following fields\n\n\nExample:\n\n```JSON\n[\n {\n \"id\": 12345,\n \"status\": \"Running\",\n \"total\": 170\n }\n]\n```", ), parameters: Some( [ @@ -5641,7 +5659,9 @@ }, ApiMethod { name: "results", - description: None, + description: Some( + "The response is a JSON object with the following fields\n\n\n\n\nExample:\n\n```JSON\n{\n \"results\": [\n {\n \"descrLink\": \"http://www.legittorrents.info/index.php?page=torrent-details&id=8d5f512e1acb687029b8d7cc6c5a84dce51d7a41\",\n \"fileName\": \"Ubuntu-10.04-32bit-NeTV.ova\",\n \"fileSize\": -1,\n \"fileUrl\": \"http://www.legittorrents.info/download.php?id=8d5f512e1acb687029b8d7cc6c5a84dce51d7a41&f=Ubuntu-10.04-32bit-NeTV.ova.torrent\",\n \"nbLeechers\": 1,\n \"nbSeeders\": 0,\n \"siteUrl\": \"http://www.legittorrents.info\"\n },\n {\n \"descrLink\": \"http://www.legittorrents.info/index.php?page=torrent-details&id=d5179f53e105dc2c2401bcfaa0c2c4936a6aa475\",\n \"fileName\": \"mangOH-Legato-17_06-Ubuntu-16_04.ova\",\n \"fileSize\": -1,\n \"fileUrl\": \"http://www.legittorrents.info/download.php?id=d5179f53e105dc2c2401bcfaa0c2c4936a6aa475&f=mangOH-Legato-17_06-Ubuntu-16_04.ova.torrent\",\n \"nbLeechers\": 0,\n \"nbSeeders\": 59,\n \"siteUrl\": \"http://www.legittorrents.info\"\n }\n ],\n \"status\": \"Running\",\n \"total\": 2\n}\n```", + ), parameters: Some( [ Number( @@ -5682,11 +5702,264 @@ return_type: Some( ReturnType { is_list: false, - parameters: [], + parameters: [ + ReturnTypeParameter { + name: "results", + description: "Array of result objects- see table below", + return_type: StringArray( + TypeInfo { + name: "results", + is_optional: false, + is_list: false, + description: Some( + "Array of result objects- see table below", + ), + type_description: None, + }, + ), + }, + ReturnTypeParameter { + name: "status", + description: "Current status of the search job (either Running or Stopped)", + return_type: String( + TypeInfo { + name: "status", + is_optional: false, + is_list: false, + description: Some( + "Current status of the search job (either Running or Stopped)", + ), + type_description: None, + }, + ), + }, + ReturnTypeParameter { + name: "total", + description: "Total number of results. If the status is Running this number may continue to increase", + return_type: Number( + TypeInfo { + name: "total", + is_optional: false, + is_list: false, + description: Some( + "Total number of results. If the status is Running this number may continue to increase", + ), + type_description: None, + }, + ), + }, + ], }, ), url: "results", }, + ApiMethod { + name: "delete", + description: None, + parameters: Some( + [ + Number( + TypeInfo { + name: "id", + is_optional: false, + is_list: false, + description: Some( + "ID of the search job", + ), + type_description: None, + }, + ), + ], + ), + return_type: None, + url: "delete", + }, + ApiMethod { + name: "plugins", + description: Some( + "The response is a JSON array of objects containing the following fields\n\n\n```JSON\n[\n {\n \"enabled\": true,\n \"fullName\": \"Legit Torrents\",\n \"name\": \"legittorrents\",\n \"supportedCategories\": [{\n \"id\": \"all\",\n \"name\": \"All categories\"\n }, {\n \"id\": \"anime\",\n \"name\": \"Anime\"\n }, {\n \"id\": \"books\",\n \"name\": \"Books\"\n }, {\n \"id\": \"games\",\n \"name\": \"Games\"\n }, {\n \"id\": \"movies\",\n \"name\": \"Movies\"\n }, {\n \"id\": \"music\",\n \"name\": \"Music\"\n }, {\n \"id\": \"tv\",\n \"name\": \"TV shows\"\n }],\n \"url\": \"http://www.legittorrents.info\",\n \"version\": \"2.3\"\n }\n]\n```", + ), + parameters: None, + return_type: Some( + ReturnType { + is_list: true, + parameters: [ + ReturnTypeParameter { + name: "enabled", + description: "Whether the plugin is enabled", + return_type: Bool( + TypeInfo { + name: "enabled", + is_optional: false, + is_list: false, + description: Some( + "Whether the plugin is enabled", + ), + type_description: None, + }, + ), + }, + ReturnTypeParameter { + name: "fullName", + description: "Full name of the plugin", + return_type: String( + TypeInfo { + name: "fullName", + is_optional: false, + is_list: false, + description: Some( + "Full name of the plugin", + ), + type_description: None, + }, + ), + }, + ReturnTypeParameter { + name: "name", + description: "Short name of the plugin", + return_type: String( + TypeInfo { + name: "name", + is_optional: false, + is_list: false, + description: Some( + "Short name of the plugin", + ), + type_description: None, + }, + ), + }, + ReturnTypeParameter { + name: "supportedCategories", + description: "List of category objects", + return_type: StringArray( + TypeInfo { + name: "supportedCategories", + is_optional: false, + is_list: false, + description: Some( + "List of category objects", + ), + type_description: None, + }, + ), + }, + ReturnTypeParameter { + name: "url", + description: "URL of the torrent site", + return_type: String( + TypeInfo { + name: "url", + is_optional: false, + is_list: false, + description: Some( + "URL of the torrent site", + ), + type_description: None, + }, + ), + }, + ReturnTypeParameter { + name: "version", + description: "Installed version of the plugin", + return_type: String( + TypeInfo { + name: "version", + is_optional: false, + is_list: false, + description: Some( + "Installed version of the plugin", + ), + type_description: None, + }, + ), + }, + ], + }, + ), + url: "plugins", + }, + ApiMethod { + name: "installPlugin", + description: None, + parameters: Some( + [ + String( + TypeInfo { + name: "sources", + is_optional: false, + is_list: false, + description: Some( + "Url or file path of the plugin to install (e.g. \"[https://raw.githubusercontent.com/qbittorrent/search-plugins/master/nova3/engines/legittorrents.py](https://raw.githubusercontent.com/qbittorrent/search-plugins/master/nova3/engines/legittorrents.py)\"). Supports multiple sources separated by \\", + ), + type_description: None, + }, + ), + ], + ), + return_type: None, + url: "installPlugin", + }, + ApiMethod { + name: "uninstallPlugin", + description: None, + parameters: Some( + [ + String( + TypeInfo { + name: "names", + is_optional: false, + is_list: false, + description: Some( + "Name of the plugin to uninstall (e.g. \"legittorrents\"). Supports multiple names separated by \\", + ), + type_description: None, + }, + ), + ], + ), + return_type: None, + url: "uninstallPlugin", + }, + ApiMethod { + name: "enablePlugin", + description: None, + parameters: Some( + [ + String( + TypeInfo { + name: "names", + is_optional: false, + is_list: false, + description: Some( + "Name of the plugin to enable/disable (e.g. \"legittorrents\"). Supports multiple names separated by \\", + ), + type_description: None, + }, + ), + Bool( + TypeInfo { + name: "enable", + is_optional: false, + is_list: false, + description: Some( + "Whether the plugins should be enabled", + ), + type_description: None, + }, + ), + ], + ), + return_type: None, + url: "enablePlugin", + }, + ApiMethod { + name: "updatePlugins", + description: None, + parameters: None, + return_type: None, + url: "updatePlugins", + }, ], description: Some( "All Search API methods are under \"search\", e.g.: `/api/v2/search/methodName`.", diff --git a/qbittorrent-web-api-gen/tests/search_types.rs b/qbittorrent-web-api-gen/tests/search_types.rs new file mode 100644 index 0000000..f4000e0 --- /dev/null +++ b/qbittorrent-web-api-gen/tests/search_types.rs @@ -0,0 +1,20 @@ +mod common; + +use anyhow::Result; +use common::*; +use qbittorrent_web_api_gen::QBittorrentApiGen; + +#[derive(QBittorrentApiGen)] +struct Api {} + +#[tokio::main] +async fn main() -> Result<()> { + let api = Api::login(BASE_URL, USERNAME, PASSWORD).await?; + + let _ = api.search().plugins().await?; + let _ = api.search().results(1).send().await?; + let _ = api.search().delete(1).await?; + let _ = api.search().install_plugin("https://raw.githubusercontent.com/qbittorrent/search-plugins/master/nova3/engines/legittorrents.py").await?; + + Ok(()) +} diff --git a/qbittorrent-web-api-gen/tests/tests.rs b/qbittorrent-web-api-gen/tests/tests.rs index 548499f..873c7ba 100644 --- a/qbittorrent-web-api-gen/tests/tests.rs +++ b/qbittorrent-web-api-gen/tests/tests.rs @@ -20,5 +20,5 @@ fn tests() { t.pass("tests/add_torrent.rs"); t.pass("tests/another_struct_name.rs"); t.pass("tests/access_impl_types.rs"); - // t.pass("tests/search_types.rs"); + t.pass("tests/search_types.rs"); } diff --git a/qbittorrent-web-api-gen/token_tree.txt b/qbittorrent-web-api-gen/token_tree.txt index 52bd36c..db4b5e6 100644 --- a/qbittorrent-web-api-gen/token_tree.txt +++ b/qbittorrent-web-api-gen/token_tree.txt @@ -862,6 +862,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -896,6 +899,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Upon success, the response will contain a cookie with your SID. You must supply the cookie whenever you want to perform an operation that requires authentication.", ), @@ -1000,6 +1006,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -1074,6 +1083,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is a string with the application version, e.g. `v4.1.3`", ), @@ -1136,6 +1148,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is a string with the WebAPI version, e.g. `2.0`", ), @@ -1198,6 +1213,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is a JSON object containing the following fields", ), @@ -1259,6 +1277,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -1315,6 +1336,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -1371,6 +1395,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is a JSON object with several fields (key-value) pairs representing the application's settings. The contents may vary depending on which settings are present in qBittorrent.ini.", ), @@ -2566,6 +2593,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Possible values of `scan_dirs`:", ), @@ -2607,6 +2637,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Possible values of `scheduler_days`:", ), @@ -2697,6 +2730,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Possible values of `encryption`:", ), @@ -2738,6 +2774,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "NB: the first options allows you to use both encrypted and unencrypted connections (this is the default); other options are mutually exclusive: e.g. by forcing encryption on you won't be able to use unencrypted connections and vice versa.", ), @@ -2806,6 +2845,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Possible values of `dyndns_service`:", ), @@ -2840,6 +2882,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Possible values of `max_ratio_act`:", ), @@ -2874,6 +2919,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Possible values of `bittorrent_protocol`:", ), @@ -2915,6 +2963,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Possible values of `upload_choking_algorithm`:", ), @@ -2956,6 +3007,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Possible values of `upload_slots_behavior`:", ), @@ -2990,6 +3044,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Possible values of `utp_tcp_mixed_mode`:", ), @@ -3024,6 +3081,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -3557,6 +3617,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Notes**:", ), @@ -3637,6 +3700,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is a string with the default save path, e.g. `C:/Users/Dayman/Downloads`.", ), @@ -3739,6 +3805,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -3784,6 +3853,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is a JSON array in which each element is an entry of the log.", ), @@ -3843,6 +3915,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -4198,6 +4273,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -4225,6 +4303,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response a JSON array. Each element of the array of objects (each object is the information relative to a peer) containing the following fields", ), @@ -4286,6 +4367,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -4353,6 +4437,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -4398,6 +4485,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is a JSON object with the following possible fields", ), @@ -4491,6 +4581,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -4590,6 +4683,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -4642,6 +4738,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is TODO", ), @@ -4728,6 +4827,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is a JSON object with the following fields", ), @@ -4813,6 +4915,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "In addition to the above in partial data requests (see [Get partial data](#get-partial-data) for more info):", ), @@ -4858,6 +4963,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Possible values of `connection_status`:", ), @@ -4899,6 +5007,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -5000,6 +5111,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is `1` if alternative speed limits are enabled, `0` otherwise.", ), @@ -5062,6 +5176,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -5118,6 +5235,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is the value of current global download speed limit in bytes/second; this value will be zero if no limit is applied.", ), @@ -5170,6 +5290,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -5197,6 +5320,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -5253,6 +5379,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is the value of current global upload speed limit in bytes/second; this value will be zero if no limit is applied.", ), @@ -5305,6 +5434,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -5332,6 +5464,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -5379,6 +5514,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -5406,6 +5544,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -5527,6 +5668,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -5572,6 +5716,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is a JSON array with the following fields", ), @@ -5953,6 +6100,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Possible values of `state`:", ), @@ -6106,6 +6256,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -6254,6 +6407,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -6288,6 +6444,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is:", ), @@ -6582,6 +6741,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "NB: `-1` is returned if the type of the property is integer but its value is not known.", ), @@ -6760,6 +6922,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -6794,6 +6959,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is a JSON array, where each element contains info about one tracker, with the following fields", ), @@ -6879,6 +7047,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Possible values of `status`:", ), @@ -6934,6 +7105,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -7034,6 +7208,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -7068,6 +7245,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is a JSON array, where each element is information about one webseed, with the following fields", ), @@ -7097,6 +7277,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -7197,6 +7380,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -7231,6 +7417,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is:", ), @@ -7325,6 +7514,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Possible values of `priority`:", ), @@ -7373,6 +7565,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -7479,6 +7674,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -7513,6 +7711,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is:", ), @@ -7569,6 +7770,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -7639,6 +7843,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -7673,6 +7880,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is:", ), @@ -7759,6 +7969,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -7781,6 +7994,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -7808,6 +8024,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -7861,6 +8080,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -7883,6 +8105,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -7910,6 +8135,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -7970,6 +8198,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -8015,6 +8246,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -8068,6 +8302,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -8090,6 +8327,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -8117,6 +8357,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -8170,6 +8413,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -8192,6 +8438,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -8219,6 +8468,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -8603,6 +8855,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -8637,6 +8892,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -8733,6 +8991,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -8795,6 +9056,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -8850,6 +9114,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -8905,6 +9172,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -8946,6 +9216,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -9002,6 +9275,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -9036,6 +9312,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -9089,6 +9368,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -9111,6 +9393,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -9145,6 +9430,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -9198,6 +9486,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -9220,6 +9511,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -9254,6 +9548,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -9307,6 +9604,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -9329,6 +9629,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -9363,6 +9666,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -9416,6 +9722,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -9438,6 +9747,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -9472,6 +9784,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -9535,6 +9850,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "`id` values correspond to file position inside the array returned by [torrent contents API](#get-torrent-contents), e.g. `id=0` for first file, `id=1` for second file, etc.", ), @@ -9609,6 +9927,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -9669,6 +9990,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Table( Table { header: TableRow { @@ -9682,6 +10006,9 @@ TokenTree { rows: [], }, ), + Text( + "Server reply (example):", + ), Text( "", ), @@ -9769,6 +10096,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Table( Table { header: TableRow { @@ -9782,6 +10112,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -9809,6 +10142,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -9869,6 +10205,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Table( Table { header: TableRow { @@ -9882,6 +10221,9 @@ TokenTree { rows: [], }, ), + Text( + "`seedingTimeLimit` is the max amount of time the torrent should be seeded. `-2` means the global limit should be used, `-1` means no limit.", + ), Text( "", ), @@ -9912,6 +10254,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -9972,6 +10317,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Table( Table { header: TableRow { @@ -9985,6 +10333,9 @@ TokenTree { rows: [], }, ), + Text( + "Server reply (example):", + ), Text( "", ), @@ -10078,6 +10429,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Table( Table { header: TableRow { @@ -10091,6 +10445,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -10118,6 +10475,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -10178,6 +10538,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Table( Table { header: TableRow { @@ -10191,6 +10554,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -10239,6 +10605,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -10336,6 +10705,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -10396,6 +10768,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Table( Table { header: TableRow { @@ -10409,6 +10784,9 @@ TokenTree { rows: [], }, ), + Text( + "`category` is the torrent category you want to set.", + ), Text( "", ), @@ -10446,6 +10824,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -10544,6 +10925,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -10641,6 +11025,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -10732,6 +11119,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -10815,6 +11205,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -10875,6 +11268,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Table( Table { header: TableRow { @@ -10888,6 +11284,9 @@ TokenTree { rows: [], }, ), + Text( + "`tags` is the list of tags you want to add to passed torrents.", + ), Text( "", ), @@ -10918,6 +11317,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -10978,6 +11380,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Table( Table { header: TableRow { @@ -10991,6 +11396,9 @@ TokenTree { rows: [], }, ), + Text( + "`tags` is the list of tags you want to remove from passed torrents.", + ), Text( "Empty list removes all tags from relevant torrents.", ), @@ -11024,6 +11432,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -11104,6 +11515,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -11187,6 +11601,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -11273,6 +11690,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -11333,6 +11753,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Table( Table { header: TableRow { @@ -11346,6 +11769,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -11373,6 +11799,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -11426,6 +11855,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -11448,6 +11880,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -11475,6 +11910,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -11528,6 +11966,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -11550,6 +11991,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -11577,6 +12021,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -11646,6 +12093,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -11673,6 +12123,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -11742,6 +12195,9 @@ TokenTree { rows: [], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -11769,6 +12225,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -11831,6 +12290,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -11872,6 +12334,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -11934,6 +12399,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -11975,6 +12443,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -12039,6 +12510,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -12073,6 +12547,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -12127,6 +12604,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -12161,6 +12641,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -12213,6 +12696,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -12247,6 +12733,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -12307,6 +12796,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -12341,6 +12833,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -12387,6 +12882,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Returns all RSS items in JSON format, e.g.:", ), @@ -12486,6 +12984,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -12513,6 +13014,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -12565,6 +13069,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -12592,6 +13099,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -12646,6 +13156,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Rule definition is JSON encoded dictionary with the following fields:", ), @@ -12771,6 +13284,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "E.g.:", ), @@ -12894,6 +13410,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -12921,6 +13440,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -12967,6 +13489,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -12997,6 +13522,9 @@ TokenTree { Text( "", ), + Text( + "", + ), ], children: [], }, @@ -13113,6 +13641,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -13156,6 +13687,9 @@ TokenTree { Text( "", ), + Text( + "", + ), Text( "Returns all articles that match a rule by feed name in JSON format, e.g.:", ), @@ -13252,6 +13786,9 @@ TokenTree { Text( "", ), + Text( + "", + ), ], children: [], }, @@ -13333,6 +13870,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -13367,6 +13907,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is a JSON object with the following fields", ), @@ -13396,6 +13939,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -13466,6 +14012,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -13500,6 +14049,9 @@ TokenTree { ], }, ), + Text( + "", + ), ], children: [], }, @@ -13546,6 +14098,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -13580,6 +14135,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is a JSON array of objects containing the following fields", ), @@ -13625,6 +14183,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "Example:", ), @@ -13723,6 +14284,9 @@ TokenTree { ], }, ), + Text( + "", + ), Asterix( "Returns:", ), @@ -13764,6 +14328,9 @@ TokenTree { ], }, ), + Text( + "", + ), Text( "The response is a JSON object with the following fields", ), @@ -13781,13 +14348,854 @@ TokenTree { ], }, split: "----------------------------------|---------|------------", - rows: [], + rows: [ + TableRow { + raw: "`results` | array | Array of `result` objects- see table below", + columns: [ + "results", + "array", + "Array of result objects- see table below", + ], + }, + TableRow { + raw: "`status` | string | Current status of the search job (either `Running` or `Stopped`)", + columns: [ + "status", + "string", + "Current status of the search job (either Running or Stopped)", + ], + }, + TableRow { + raw: "`total` | number | Total number of results. If the status is `Running` this number may continue to increase", + columns: [ + "total", + "number", + "Total number of results. If the status is Running this number may continue to increase", + ], + }, + ], }, ), + Text( + "", + ), + Asterix( + "Result object:", + ), + Text( + "", + ), + Table( + Table { + header: TableRow { + raw: "Field | Type | Description", + columns: [ + "Field", + "Type", + "Description", + ], + }, + split: "----------------------------------|---------|------------", + rows: [ + TableRow { + raw: "`descrLink` | string | URL of the torrent's description page", + columns: [ + "descrLink", + "string", + "URL of the torrent's description page", + ], + }, + TableRow { + raw: "`fileName` | string | Name of the file", + columns: [ + "fileName", + "string", + "Name of the file", + ], + }, + TableRow { + raw: "`fileSize` | number | Size of the file in Bytes", + columns: [ + "fileSize", + "number", + "Size of the file in Bytes", + ], + }, + TableRow { + raw: "`fileUrl` | string | Torrent download link (usually either .torrent file or magnet link)", + columns: [ + "fileUrl", + "string", + "Torrent download link (usually either .torrent file or magnet link)", + ], + }, + TableRow { + raw: "`nbLeechers` | number | Number of leechers", + columns: [ + "nbLeechers", + "number", + "Number of leechers", + ], + }, + TableRow { + raw: "`nbSeeders` | number | Number of seeders", + columns: [ + "nbSeeders", + "number", + "Number of seeders", + ], + }, + TableRow { + raw: "`siteUrl` | string | URL of the torrent site", + columns: [ + "siteUrl", + "string", + "URL of the torrent site", + ], + }, + ], + }, + ), + Text( + "", + ), + Text( + "Example:", + ), + Text( + "", + ), + Text( + "```JSON", + ), + Text( + "{", + ), + Text( + " \"results\": [", + ), + Text( + " {", + ), + Text( + " \"descrLink\": \"http://www.legittorrents.info/index.php?page=torrent-details&id=8d5f512e1acb687029b8d7cc6c5a84dce51d7a41\",", + ), + Text( + " \"fileName\": \"Ubuntu-10.04-32bit-NeTV.ova\",", + ), + Text( + " \"fileSize\": -1,", + ), + Text( + " \"fileUrl\": \"http://www.legittorrents.info/download.php?id=8d5f512e1acb687029b8d7cc6c5a84dce51d7a41&f=Ubuntu-10.04-32bit-NeTV.ova.torrent\",", + ), + Text( + " \"nbLeechers\": 1,", + ), + Text( + " \"nbSeeders\": 0,", + ), + Text( + " \"siteUrl\": \"http://www.legittorrents.info\"", + ), + Text( + " },", + ), + Text( + " {", + ), + Text( + " \"descrLink\": \"http://www.legittorrents.info/index.php?page=torrent-details&id=d5179f53e105dc2c2401bcfaa0c2c4936a6aa475\",", + ), + Text( + " \"fileName\": \"mangOH-Legato-17_06-Ubuntu-16_04.ova\",", + ), + Text( + " \"fileSize\": -1,", + ), + Text( + " \"fileUrl\": \"http://www.legittorrents.info/download.php?id=d5179f53e105dc2c2401bcfaa0c2c4936a6aa475&f=mangOH-Legato-17_06-Ubuntu-16_04.ova.torrent\",", + ), + Text( + " \"nbLeechers\": 0,", + ), + Text( + " \"nbSeeders\": 59,", + ), + Text( + " \"siteUrl\": \"http://www.legittorrents.info\"", + ), + Text( + " }", + ), + Text( + " ],", + ), + Text( + " \"status\": \"Running\",", + ), + Text( + " \"total\": 2", + ), + Text( + "}", + ), + Text( + "```", + ), + Text( + "", + ), + ], + children: [], + }, + TokenTree { + title: Some( + "Delete search", + ), + content: [ + Text( + "", + ), + Text( + "Name: `delete`", + ), + Text( + "", + ), + Asterix( + "Parameters:", + ), + Text( + "", + ), + Table( + Table { + header: TableRow { + raw: "Parameter | Type | Description", + columns: [ + "Parameter", + "Type", + "Description", + ], + }, + split: "----------------------------------|---------|------------", + rows: [ + TableRow { + raw: "`id` | number | ID of the search job", + columns: [ + "id", + "number", + "ID of the search job", + ], + }, + ], + }, + ), + Text( + "", + ), + Asterix( + "Returns:", + ), + Text( + "", + ), + Table( + Table { + header: TableRow { + raw: "HTTP Status Code | Scenario", + columns: [ + "HTTP Status Code", + "Scenario", + ], + }, + split: "----------------------------------|---------------------", + rows: [ + TableRow { + raw: "404 | Search job was not found", + columns: [ + "404", + "Search job was not found", + ], + }, + TableRow { + raw: "200 | All other scenarios", + columns: [ + "200", + "All other scenarios", + ], + }, + ], + }, + ), + Text( + "", + ), + ], + children: [], + }, + TokenTree { + title: Some( + "Get search plugins", + ), + content: [ + Text( + "", + ), + Text( + "Name: `plugins`", + ), + Text( + "", + ), + Asterix( + "Parameters:", + ), + Text( + "", + ), + Text( + "None", + ), + Text( + "", + ), + Asterix( + "Returns:", + ), + Text( + "", + ), + Table( + Table { + header: TableRow { + raw: "HTTP Status Code | Scenario", + columns: [ + "HTTP Status Code", + "Scenario", + ], + }, + split: "----------------------------------|---------------------", + rows: [ + TableRow { + raw: "200 | All scenarios- see JSON below", + columns: [ + "200", + "All scenarios- see JSON below", + ], + }, + ], + }, + ), + Text( + "", + ), + Text( + "The response is a JSON array of objects containing the following fields", + ), + Text( + "", + ), + Table( + Table { + header: TableRow { + raw: "Field | Type | Description", + columns: [ + "Field", + "Type", + "Description", + ], + }, + split: "----------------------------------|---------|------------", + rows: [ + TableRow { + raw: "`enabled` | bool | Whether the plugin is enabled", + columns: [ + "enabled", + "bool", + "Whether the plugin is enabled", + ], + }, + TableRow { + raw: "`fullName` | string | Full name of the plugin", + columns: [ + "fullName", + "string", + "Full name of the plugin", + ], + }, + TableRow { + raw: "`name` | string | Short name of the plugin", + columns: [ + "name", + "string", + "Short name of the plugin", + ], + }, + TableRow { + raw: "`supportedCategories` | array | List of category objects", + columns: [ + "supportedCategories", + "array", + "List of category objects", + ], + }, + TableRow { + raw: "`url` | string | URL of the torrent site", + columns: [ + "url", + "string", + "URL of the torrent site", + ], + }, + TableRow { + raw: "`version` | string | Installed version of the plugin", + columns: [ + "version", + "string", + "Installed version of the plugin", + ], + }, + ], + }, + ), + Text( + "", + ), + Text( + "```JSON", + ), + Text( + "[", + ), + Text( + " {", + ), + Text( + " \"enabled\": true,", + ), + Text( + " \"fullName\": \"Legit Torrents\",", + ), + Text( + " \"name\": \"legittorrents\",", + ), + Text( + " \"supportedCategories\": [{", + ), + Text( + " \"id\": \"all\",", + ), + Text( + " \"name\": \"All categories\"", + ), + Text( + " }, {", + ), + Text( + " \"id\": \"anime\",", + ), + Text( + " \"name\": \"Anime\"", + ), + Text( + " }, {", + ), + Text( + " \"id\": \"books\",", + ), + Text( + " \"name\": \"Books\"", + ), + Text( + " }, {", + ), + Text( + " \"id\": \"games\",", + ), + Text( + " \"name\": \"Games\"", + ), + Text( + " }, {", + ), + Text( + " \"id\": \"movies\",", + ), + Text( + " \"name\": \"Movies\"", + ), + Text( + " }, {", + ), + Text( + " \"id\": \"music\",", + ), + Text( + " \"name\": \"Music\"", + ), + Text( + " }, {", + ), + Text( + " \"id\": \"tv\",", + ), + Text( + " \"name\": \"TV shows\"", + ), + Text( + " }],", + ), + Text( + " \"url\": \"http://www.legittorrents.info\",", + ), + Text( + " \"version\": \"2.3\"", + ), + Text( + " }", + ), + Text( + "]", + ), + Text( + "```", + ), + Text( + "", + ), + ], + children: [], + }, + TokenTree { + title: Some( + "Install search plugin", + ), + content: [ + Text( + "", + ), + Text( + "Name: `installPlugin`", + ), + Text( + "", + ), + Asterix( + "Parameters:", + ), + Text( + "", + ), + Table( + Table { + header: TableRow { + raw: "Parameter | Type | Description", + columns: [ + "Parameter", + "Type", + "Description", + ], + }, + split: "----------------------------------|---------|------------", + rows: [ + TableRow { + raw: "`sources` | string | Url or file path of the plugin to install (e.g. \"[https://raw.githubusercontent.com/qbittorrent/search-plugins/master/nova3/engines/legittorrents.py](https://raw.githubusercontent.com/qbittorrent/search-plugins/master/nova3/engines/legittorrents.py)\"). Supports multiple sources separated by `\\|`", + columns: [ + "sources", + "string", + "Url or file path of the plugin to install (e.g. \"[https://raw.githubusercontent.com/qbittorrent/search-plugins/master/nova3/engines/legittorrents.py](https://raw.githubusercontent.com/qbittorrent/search-plugins/master/nova3/engines/legittorrents.py)\"). Supports multiple sources separated by \\", + "", + ], + }, + ], + }, + ), + Text( + "", + ), + Asterix( + "Returns:", + ), + Text( + "", + ), + Table( + Table { + header: TableRow { + raw: "HTTP Status Code | Scenario", + columns: [ + "HTTP Status Code", + "Scenario", + ], + }, + split: "----------------------------------|---------------------", + rows: [ + TableRow { + raw: "200 | All scenarios", + columns: [ + "200", + "All scenarios", + ], + }, + ], + }, + ), + Text( + "", + ), + ], + children: [], + }, + TokenTree { + title: Some( + "Uninstall search plugin", + ), + content: [ + Text( + "", + ), + Text( + "Name: `uninstallPlugin`", + ), + Text( + "", + ), + Asterix( + "Parameters:", + ), + Text( + "", + ), + Table( + Table { + header: TableRow { + raw: "Parameter | Type | Description", + columns: [ + "Parameter", + "Type", + "Description", + ], + }, + split: "----------------------------------|---------|------------", + rows: [ + TableRow { + raw: "`names` | string | Name of the plugin to uninstall (e.g. \"legittorrents\"). Supports multiple names separated by `\\|`", + columns: [ + "names", + "string", + "Name of the plugin to uninstall (e.g. \"legittorrents\"). Supports multiple names separated by \\", + "", + ], + }, + ], + }, + ), + Text( + "", + ), + Asterix( + "Returns:", + ), + Text( + "", + ), + Table( + Table { + header: TableRow { + raw: "HTTP Status Code | Scenario", + columns: [ + "HTTP Status Code", + "Scenario", + ], + }, + split: "----------------------------------|---------------------", + rows: [ + TableRow { + raw: "200 | All scenarios", + columns: [ + "200", + "All scenarios", + ], + }, + ], + }, + ), + Text( + "", + ), + ], + children: [], + }, + TokenTree { + title: Some( + "Enable search plugin", + ), + content: [ + Text( + "", + ), + Text( + "Name: `enablePlugin`", + ), + Text( + "", + ), + Asterix( + "Parameters:", + ), + Text( + "", + ), + Table( + Table { + header: TableRow { + raw: "Parameter | Type | Description", + columns: [ + "Parameter", + "Type", + "Description", + ], + }, + split: "----------------------------------|---------|------------", + rows: [ + TableRow { + raw: "`names` | string | Name of the plugin to enable/disable (e.g. \"legittorrents\"). Supports multiple names separated by `\\|`", + columns: [ + "names", + "string", + "Name of the plugin to enable/disable (e.g. \"legittorrents\"). Supports multiple names separated by \\", + "", + ], + }, + TableRow { + raw: "`enable` | bool | Whether the plugins should be enabled", + columns: [ + "enable", + "bool", + "Whether the plugins should be enabled", + ], + }, + ], + }, + ), + Text( + "", + ), + Asterix( + "Returns:", + ), + Text( + "", + ), + Table( + Table { + header: TableRow { + raw: "HTTP Status Code | Scenario", + columns: [ + "HTTP Status Code", + "Scenario", + ], + }, + split: "----------------------------------|---------------------", + rows: [ + TableRow { + raw: "200 | All scenarios", + columns: [ + "200", + "All scenarios", + ], + }, + ], + }, + ), + Text( + "", + ), + ], + children: [], + }, + TokenTree { + title: Some( + "Update search plugins", + ), + content: [ + Text( + "", + ), + Text( + "Name: `updatePlugins`", + ), + Text( + "", + ), + Asterix( + "Parameters:", + ), + Text( + "", + ), + Text( + "None", + ), + Text( + "", + ), + Asterix( + "Returns:", + ), + Text( + "", + ), + Table( + Table { + header: TableRow { + raw: "HTTP Status Code | Scenario", + columns: [ + "HTTP Status Code", + "Scenario", + ], + }, + split: "----------------------------------|---------------------", + rows: [ + TableRow { + raw: "200 | All scenarios", + columns: [ + "200", + "All scenarios", + ], + }, + ], + }, + ), + Text( + "", + ), ], children: [], }, ], }, + TokenTree { + title: Some( + "WebAPI versioning", + ), + content: [ + Text( + "WebAPI uses the following versioning: `1.2.3`:", + ), + Text( + "1. Main version. Should be changed only on some global changes (e.g. total redesign/relayout)", + ), + Text( + "2. Changed on incompatible API changes (i.e. if it breaks outdated clients). E.g. if you change/remove something", + ), + Text( + "3. Changed on compatible API changes (i.e. if it doesn't break outdated clients). E.g. if you add something new outdated clients still can access old subset of API.", + ), + ], + children: [], + }, ], } \ No newline at end of file