diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-05-14 18:02:29 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-05-14 18:02:29 -0700 |
commit | a6cb90c81c29663e96d4fd96acd43fde1c28ac15 (patch) | |
tree | 24d116fb5fe6b1e2687f833cee9685d6480a95eb /util/shredder | |
parent | b467dc4f0055452b65fac842d1294ec9cc978445 (diff) | |
parent | 51b89f0ed8833004cf695de90791d8d0eec550b5 (diff) | |
download | volse-hubzilla-a6cb90c81c29663e96d4fd96acd43fde1c28ac15.tar.gz volse-hubzilla-a6cb90c81c29663e96d4fd96acd43fde1c28ac15.tar.bz2 volse-hubzilla-a6cb90c81c29663e96d4fd96acd43fde1c28ac15.zip |
Merge branch 'master' into tres
Conflicts:
include/Import/refimport.php
include/activities.php
include/attach.php
include/event.php
include/externals.php
include/identity.php
include/items.php
include/notifier.php
include/photos.php
include/taxonomy.php
include/zot.php
mod/channel.php
mod/connedit.php
mod/events.php
mod/item.php
mod/like.php
mod/manage.php
mod/mood.php
mod/ping.php
mod/poke.php
mod/subthread.php
mod/tagger.php
mod/thing.php
Diffstat (limited to 'util/shredder')
-rwxr-xr-x | util/shredder/ShredOAuth.sh | 28 | ||||
-rwxr-xr-x | util/shredder/shredder | 2 |
2 files changed, 15 insertions, 15 deletions
diff --git a/util/shredder/ShredOAuth.sh b/util/shredder/ShredOAuth.sh index 9828124c7..c119132cd 100755 --- a/util/shredder/ShredOAuth.sh +++ b/util/shredder/ShredOAuth.sh @@ -27,13 +27,13 @@ F_API_VERSION="1" # Friendica API endpoints -F_ACCOUNF_UPDATE_PROFILE_IMAGE="${redmatrix_url}/api/account/update_profile_image" -F_STATUSES_UPDATE="${redmatrix_url}/api/statuses/update" -F_STATUSES_HOME_TIMELINE="${redmatrix_url}/api/statuses/home_timeline" +F_ACCOUNF_UPDATE_PROFILE_IMAGE="${hubzilla_url}/api/account/update_profile_image" +F_STATUSES_UPDATE="${hubzilla_url}/api/statuses/update" +F_STATUSES_HOME_TIMELINE="${hubzilla_url}/api/statuses/home_timeline" -F_REQUESF_TOKEN=${redmatrix_url}'/api/oauth/request_token' -F_ACCESS_TOKEN=${redmatrix_url}'/api/oauth/access_token' -F_AUTHORIZE_TOKEN=${redmatrix_url}'/api/oauth/authorize' +F_REQUESF_TOKEN=${hubzilla_url}'/api/oauth/request_token' +F_ACCESS_TOKEN=${hubzilla_url}'/api/oauth/access_token' +F_AUTHORIZE_TOKEN=${hubzilla_url}'/api/oauth/authorize' # Source OAuth.sh @@ -76,7 +76,7 @@ FO_access_token_helper () { # Request Token - local auth_header="$(_OAuth_authorization_header 'Authorization' "$redmatrix_url/" "$oauth_consumer_key" "$oauth_consumer_secret" '' '' "$oauth_signature_method" "$oauth_version" "$(OAuth_nonce)" "$(OAuth_timestamp)" 'POST' "$F_REQUESF_TOKEN" "$(OAuth_param 'oauth_callback' 'oob')"), $(OAuth_param_quote 'oauth_callback' 'oob')" + local auth_header="$(_OAuth_authorization_header 'Authorization' "$hubzilla_url/" "$oauth_consumer_key" "$oauth_consumer_secret" '' '' "$oauth_signature_method" "$oauth_version" "$(OAuth_nonce)" "$(OAuth_timestamp)" 'POST' "$F_REQUESF_TOKEN" "$(OAuth_param 'oauth_callback' 'oob')"), $(OAuth_param_quote 'oauth_callback' 'oob')" # echo $auth_header # echo $F_REQUESF_TOKEN @@ -95,7 +95,7 @@ FO_access_token_helper () { # Access Token - local auth_header="$(_OAuth_authorization_header 'Authorization' "$redmatrix_url/" "$oauth_consumer_key" "$oauth_consumer_secret" "$_oauth_token" "$_oauth_token_secret" "$oauth_signature_method" "$oauth_version" "$(OAuth_nonce)" "$(OAuth_timestamp)" 'POST' "$F_ACCESS_TOKEN" "$(OAuth_param 'oauth_verifier' "$PIN")"), $(OAuth_param_quote 'oauth_verifier' "$PIN")" + local auth_header="$(_OAuth_authorization_header 'Authorization' "$hubzilla_url/" "$oauth_consumer_key" "$oauth_consumer_secret" "$_oauth_token" "$_oauth_token_secret" "$oauth_signature_method" "$oauth_version" "$(OAuth_nonce)" "$(OAuth_timestamp)" 'POST' "$F_ACCESS_TOKEN" "$(OAuth_param 'oauth_verifier' "$PIN")"), $(OAuth_param_quote 'oauth_verifier' "$PIN")" resp=$(curl -s -d "" -H "$auth_header" "$F_ACCESS_TOKEN") FO_rval=$? @@ -133,7 +133,7 @@ FO_statuses_update () { [[ "$3" != "" ]] && params[${#params[@]}]=$(OAuth_param 'in_reply_to_status_id' "$3") && local in_reply_to_status_id=( '--data-urlencode' "in_reply_to_status_id=$3" ) - local auth_header=$(OAuth_authorization_header 'Authorization' "$redmatrix_url" '' '' 'POST' "$F_STATUSES_UPDATE.$format" ${params[@]}) + local auth_header=$(OAuth_authorization_header 'Authorization' "$hubzilla_url" '' '' 'POST' "$F_STATUSES_UPDATE.$format" ${params[@]}) FO_ret=$(curl -s -H "$auth_header" --data-urlencode "status=$2" --data-urlencode "source=shred" ${in_reply_to_status_id[@]} "$F_STATUSES_UPDATE.$format") @@ -163,7 +163,7 @@ FO_statuses_home_timeline () { $(OAuth_param 'count' $count) ) - local auth_header=$(OAuth_authorization_header 'Authorization' "$redmatrix_url" '' '' 'GET' "$F_STATUSES_HOME_TIMELINE.$format" ${params[@]}) + local auth_header=$(OAuth_authorization_header 'Authorization' "$hubzilla_url" '' '' 'GET' "$F_STATUSES_HOME_TIMELINE.$format" ${params[@]}) convscreen=$(OAuth_PE "$screen_name"); FO_ret=$(curl -s --get "${F_STATUSES_HOME_TIMELINE}.${format}" --data "screen_name=${convscreen}&count=${count}" --header "${auth_header}") @@ -204,12 +204,12 @@ FO_command () { local auth_header=''; if [ "$post" == '1' ]; then - auth_header=$(OAuth_authorization_header 'Authorization' "$redmatrix_url" '' '' 'POST' "${redmatrix_url}/api/${command}.json" ${params[@]}) - FO_ret=$(curl -s "${redmatrix_url}/api/${command}.json" --data-urlencode "${data}" --header "${auth_header}") + auth_header=$(OAuth_authorization_header 'Authorization' "$hubzilla_url" '' '' 'POST' "${hubzilla_url}/api/${command}.json" ${params[@]}) + FO_ret=$(curl -s "${hubzilla_url}/api/${command}.json" --data-urlencode "${data}" --header "${auth_header}") else - auth_header=$(OAuth_authorization_header 'Authorization' "$redmatrix_url" '' '' 'GET' "${redmatrix_url}/api/${command}.json" ${params[@]}) - FO_ret=$(curl -s --get "${redmatrix_url}/api/${command}.json" --data "${data}" --header "${auth_header}") + auth_header=$(OAuth_authorization_header 'Authorization' "$hubzilla_url" '' '' 'GET' "${hubzilla_url}/api/${command}.json" ${params[@]}) + FO_ret=$(curl -s --get "${hubzilla_url}/api/${command}.json" --data "${data}" --header "${auth_header}") fi diff --git a/util/shredder/shredder b/util/shredder/shredder index ac84f0541..61e6b1fd4 100755 --- a/util/shredder/shredder +++ b/util/shredder/shredder @@ -45,7 +45,7 @@ Use -h -c command to get options for the command. show_config_help () { echo "Please create $FCLI_RC with: -redmatrix_url=YOR_SERVER_URL (no trailing /) +hubzilla_url=YOR_SERVER_URL (no trailing /) oauth_consumer_key=YOUR_CONSUMER_KEY oauth_consumer_secret=YOUR_CONSUMER_SECRET |