diff options
author | friendica <info@friendica.com> | 2014-05-08 22:44:12 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-05-08 22:44:12 -0700 |
commit | d3b5509b333f9bfc4641683572039bc8d4eaef88 (patch) | |
tree | 6aa1a7da597b19865ba5c137aeee9a79263b7305 /util/shred/FriendicaOAuth.sh | |
parent | 831b18cf283cd52fd1b01d6c6c4648b8351985a7 (diff) | |
download | volse-hubzilla-d3b5509b333f9bfc4641683572039bc8d4eaef88.tar.gz volse-hubzilla-d3b5509b333f9bfc4641683572039bc8d4eaef88.tar.bz2 volse-hubzilla-d3b5509b333f9bfc4641683572039bc8d4eaef88.zip |
shred: ability to execute somewhat arbitrary API functions and echo results
Diffstat (limited to 'util/shred/FriendicaOAuth.sh')
-rwxr-xr-x | util/shred/FriendicaOAuth.sh | 18 |
1 files changed, 18 insertions, 0 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 +} |