1
0
api/scpt/card_add_16.zsh

18 lines
468 B
Bash
Raw Normal View History

2023-08-03 03:32:44 +00:00
#!/bin/zsh
host=https://api.syui.ai
pass=`cat ~/.config/atr/api_card.json|jq -r .password`
if [ -z "$1" ];then
exit
fi
echo username
read
id=`curl -sL "$host/users?itemsPerPage=2000"|jq ".[]|select(.username == \"$1\")"|jq -r .id`
2023-11-03 02:24:42 +00:00
card=7
cp=$(($RANDOM % 1000 + 400))
s=yui
skill=model
st=$s
2023-08-03 03:32:44 +00:00
curl -X POST -H "Content-Type: application/json" -d "{\"owner\":$id,\"card\":$card,\"status\":\"$s\",\"cp\":$cp,\"password\":\"$pass\",\"skill\":\"$skill\"}" -sL $host/cards