aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xutil/shred/FriendicaOAuth.sh18
-rwxr-xr-xutil/shred/shred6
2 files changed, 23 insertions, 1 deletions
diff --git a/util/shred/FriendicaOAuth.sh b/util/shred/FriendicaOAuth.sh
index 7f368508b..4055e44a9 100755
--- a/util/shred/FriendicaOAuth.sh
+++ b/util/shred/FriendicaOAuth.sh
@@ -171,3 +171,21 @@ FO_statuses_home_timeline () {
return $FO_rval
}
+
+FO_command () {
+ local command="$1"
+
+ local params=(
+ $(OAuth_param 'screen_name' $screen_name)
+ $(OAuth_param 'count' $count)
+ )
+
+
+ local auth_header=$(OAuth_authorization_header 'Authorization' "$redmatrix_url" '' '' 'GET' "${redmatrix_url}/api/${command}.json" ${params[@]})
+
+ convscreen=$(OAuth_PE "$screen_name");
+ FO_ret=$(curl -s --get "${redmatrix_url}/api/${command}.json" --data "screen_name=${convscreen}&count=${count}" --header "${auth_header}")
+ FO_rval=$?
+
+ return $FO_rval
+}
diff --git a/util/shred/shred b/util/shred/shred
index d6fa051c4..c46efa435 100755
--- a/util/shred/shred
+++ b/util/shred/shred
@@ -208,7 +208,11 @@ main () {
return $FO_rval
;;
*)
- usage 1
+ FO_command $fcli_command
+ JS_Parsed=$(echo "$FO_ret" | tokenize | parse)
+ echo "$JS_Parsed"
+ return $FO_rval
+
;;
esac
return 0