diff --git a/pleroma-cli.sh b/pleroma-cli.sh index e500680..2d34bb1 100755 --- a/pleroma-cli.sh +++ b/pleroma-cli.sh @@ -9,6 +9,7 @@ default_content_type=$(jj -i config.json default_content_type) format_time=$(jj -i config.json format_time) boost_symbol=$(jj -i config.json boost_symbol) +#[AUTH SECTION] mkdir -m 711 -p .app_sessions touch .auth.json chmod 600 .auth.json @@ -65,6 +66,39 @@ auth_api_get_token() --data-urlencode "code=$pass" | jj access_token) jj -p -i .auth.json -v "$token" "$(echo $instance | sed 's/\./\\\./g')" -o .auth.json } +#[AUTH SECTION END] + +#[MIGRATION SECTION] +backup_api_create() +{ + curl -s --compressed -X POST -H "Authorization: Bearer $auth" "$instance_point/pleroma/backups" +} + +backup_api_list() +{ + curl -s --compressed -H "Authorization: Bearer $auth" "$instance_point/pleroma/backups" +} + +mutes_api_import() +{ + curl -s --compressed -X POST -H "Authorization: Bearer $auth" "$instance_point/pleroma/mutes_import" +} + +blocks_api_import() +{ + curl -s --compressed -X POST -H "Authorization: Bearer $auth" "$instance_point/pleroma/blocks_import" +} + +follow_api_import() +{ + curl -s --compressed -X POST -H "Authorization: Bearer $auth" "$instance_point/pleroma/follow_import" +} +#[MIGRATION SECTION END] + +followings_api_get() +{ + default_curl_opt -H "Authorization: Bearer $auth" "$instance_point/accounts/$1/following?limit=40" +} thread_api_statuses() {