From 97d6852e92305cc4f01c01c5d8d24889900486fe Mon Sep 17 00:00:00 2001 From: Alad Wenter Date: Mon, 29 Feb 2016 15:22:18 +0100 Subject: [PATCH] Use RPC v5 Signed-off-by: fbt --- prm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/prm b/prm index 86aa7a8..07d190c 100755 --- a/prm +++ b/prm @@ -34,7 +34,7 @@ usage() { aur.search() { declare i aur_api_search_data aur_search_result_num aur_search_results version description - aur_api_search_data=$( curl "${cfg_curl_opts[@]}" "${cfg_aur_api}?type=search&arg=${1}" ) + aur_api_search_data=$( curl "${cfg_curl_opts[@]}" "${cfg_aur_api}&type=search&arg=${1}" ) aur_search_result_num=$( jshon -e resultcount -u <<< "$aur_api_search_data" ) # Exit if nothing was found @@ -57,7 +57,7 @@ aur.search() { aur.info() { declare pkg_aur_info aur_query_result - pkg_aur_info=$( curl "${cfg_curl_opts[@]}" "${cfg_aur_api}?type=info&v=2&arg=${1}" 2>/dev/null ) + pkg_aur_info=$( curl "${cfg_curl_opts[@]}" "${cfg_aur_api}&type=info&arg=${1}" 2>/dev/null ) aur_query_result=$( jshon -e resultcount -u <<< "$pkg_aur_info" ) (( aur_query_result )) || { return 1; } @@ -75,7 +75,7 @@ aur.get_updates() { aur_api_multireq+="&arg\[\]=$p" done - aur_api_data=$( curl "${cfg_curl_opts[@]}" "${cfg_aur_api}?type=multiinfo${aur_api_multireq}" ) + aur_api_data=$( curl "${cfg_curl_opts[@]}" "${cfg_aur_api}&type=info${aur_api_multireq}" ) aur_api_data_length=$( jshon -e results -l <<< "$aur_api_data" ) (( aur_api_data_length-- )) @@ -145,7 +145,7 @@ aur.get() { aur_api_multireq+="&arg\[\]=$dep_name" done - aur_deps_api_data=$( curl "${cfg_curl_opts[@]}" "${cfg_aur_api}?type=multiinfo${aur_api_multireq}" ) + aur_deps_api_data=$( curl "${cfg_curl_opts[@]}" "${cfg_aur_api}&type=info${aur_api_multireq}" ) aur_deps_count=$( jshon -e resultcount <<< "$aur_deps_api_data" ) if (( aur_deps_count )); then @@ -272,7 +272,7 @@ main() { unset flag_search_aur flag_search_syncdb } - cfg_aur_api="${cfg_aur_url}/rpc.php" + cfg_aur_api="${cfg_aur_url}/rpc.php/rpc/?v=5" if (( flag_search )); then action=search