Cosmetic changes

This commit is contained in:
NaiJi ✨ 2022-04-16 00:55:20 +00:00
parent 89c3eff9d4
commit 1a690be543
1 changed files with 8 additions and 4 deletions

12
post.sh
View File

@ -33,7 +33,11 @@ mkdir source
cd source cd source
wget "${source_url}" 2> /dev/null || (echo "Error with ${source_url}" && exit 1) wget "${source_url}" 2> /dev/null || (echo "Error with ${source_url}" && exit 1)
media_json=$(curl -X POST "${api_base_url}/api/v1/media" -H "Authorization: Bearer ${access_token}" -F "file=@`ls *`" -F "description=${source_url}") media_json=$(curl -X POST "${api_base_url}/api/v1/media" \
-H "Authorization: Bearer ${access_token}"\
-F "file=@`ls *`"
-F "description=${source_url}")
media_id=$(jq -r ".id" <<< ${media_json}) media_id=$(jq -r ".id" <<< ${media_json})
echo $media_json echo $media_json
@ -41,6 +45,6 @@ cd ..
rm -rf source/ rm -rf source/
curl -X POST -d '{"status":" :azrn_shiratsuyu_maid: '${hyperlink_url}'", "visibility":"'unlisted'", "media_ids":'[\"${media_id}\"]'}' \ curl -X POST -d '{"status":" :azrn_shiratsuyu_maid: '${hyperlink_url}'", "visibility":"'unlisted'", "media_ids":'[\"${media_id}\"]'}' \
-H "Authorization: Bearer ${access_token}" \ -H "Authorization: Bearer ${access_token}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
"${api_base_url}/api/v1/statuses" "${api_base_url}/api/v1/statuses"