use super::ZapApiError;
use super::ZapService;
use serde_json::Value;
use std::collections::HashMap;
pub fn latest_version_number(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(service, "autoupdate", "view", "latestVersionNumber", params)
}
pub fn is_latest_version(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(service, "autoupdate", "view", "isLatestVersion", params)
}
pub fn installed_addons(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(service, "autoupdate", "view", "installedAddons", params)
}
pub fn local_addons(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(service, "autoupdate", "view", "localAddons", params)
}
pub fn new_addons(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(service, "autoupdate", "view", "newAddons", params)
}
pub fn updated_addons(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(service, "autoupdate", "view", "updatedAddons", params)
}
pub fn marketplace_addons(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(service, "autoupdate", "view", "marketplaceAddons", params)
}
pub fn option_addon_directories(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(
service,
"autoupdate",
"view",
"optionAddonDirectories",
params,
)
}
pub fn option_day_last_checked(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(
service,
"autoupdate",
"view",
"optionDayLastChecked",
params,
)
}
pub fn option_day_last_install_warned(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(
service,
"autoupdate",
"view",
"optionDayLastInstallWarned",
params,
)
}
pub fn option_day_last_update_warned(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(
service,
"autoupdate",
"view",
"optionDayLastUpdateWarned",
params,
)
}
pub fn option_download_directory(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(
service,
"autoupdate",
"view",
"optionDownloadDirectory",
params,
)
}
pub fn option_check_addon_updates(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(
service,
"autoupdate",
"view",
"optionCheckAddonUpdates",
params,
)
}
pub fn option_check_on_start(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(service, "autoupdate", "view", "optionCheckOnStart", params)
}
pub fn option_download_new_release(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(
service,
"autoupdate",
"view",
"optionDownloadNewRelease",
params,
)
}
pub fn option_install_addon_updates(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(
service,
"autoupdate",
"view",
"optionInstallAddonUpdates",
params,
)
}
pub fn option_install_scanner_rules(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(
service,
"autoupdate",
"view",
"optionInstallScannerRules",
params,
)
}
pub fn option_report_alpha_addons(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(
service,
"autoupdate",
"view",
"optionReportAlphaAddons",
params,
)
}
pub fn option_report_beta_addons(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(
service,
"autoupdate",
"view",
"optionReportBetaAddons",
params,
)
}
pub fn option_report_release_addons(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(
service,
"autoupdate",
"view",
"optionReportReleaseAddons",
params,
)
}
pub fn download_latest_release(service: &ZapService) -> Result<Value, ZapApiError> {
let params = HashMap::new();
super::call(
service,
"autoupdate",
"action",
"downloadLatestRelease",
params,
)
}
pub fn install_addon(service: &ZapService, id: String) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("id".to_string(), id);
super::call(service, "autoupdate", "action", "installAddon", params)
}
pub fn install_local_addon(service: &ZapService, file: String) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("file".to_string(), file);
super::call(service, "autoupdate", "action", "installLocalAddon", params)
}
pub fn uninstall_addon(service: &ZapService, id: String) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("id".to_string(), id);
super::call(service, "autoupdate", "action", "uninstallAddon", params)
}
pub fn set_option_check_addon_updates(
service: &ZapService,
boolean: String,
) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("Boolean".to_string(), boolean);
super::call(
service,
"autoupdate",
"action",
"setOptionCheckAddonUpdates",
params,
)
}
pub fn set_option_check_on_start(
service: &ZapService,
boolean: String,
) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("Boolean".to_string(), boolean);
super::call(
service,
"autoupdate",
"action",
"setOptionCheckOnStart",
params,
)
}
pub fn set_option_download_new_release(
service: &ZapService,
boolean: String,
) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("Boolean".to_string(), boolean);
super::call(
service,
"autoupdate",
"action",
"setOptionDownloadNewRelease",
params,
)
}
pub fn set_option_install_addon_updates(
service: &ZapService,
boolean: String,
) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("Boolean".to_string(), boolean);
super::call(
service,
"autoupdate",
"action",
"setOptionInstallAddonUpdates",
params,
)
}
pub fn set_option_install_scanner_rules(
service: &ZapService,
boolean: String,
) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("Boolean".to_string(), boolean);
super::call(
service,
"autoupdate",
"action",
"setOptionInstallScannerRules",
params,
)
}
pub fn set_option_report_alpha_addons(
service: &ZapService,
boolean: String,
) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("Boolean".to_string(), boolean);
super::call(
service,
"autoupdate",
"action",
"setOptionReportAlphaAddons",
params,
)
}
pub fn set_option_report_beta_addons(
service: &ZapService,
boolean: String,
) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("Boolean".to_string(), boolean);
super::call(
service,
"autoupdate",
"action",
"setOptionReportBetaAddons",
params,
)
}
pub fn set_option_report_release_addons(
service: &ZapService,
boolean: String,
) -> Result<Value, ZapApiError> {
let mut params = HashMap::new();
params.insert("Boolean".to_string(), boolean);
super::call(
service,
"autoupdate",
"action",
"setOptionReportReleaseAddons",
params,
)
}