forked from jorrit-stack/Raycast-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreset_tokens.sh
More file actions
executable file
·29 lines (24 loc) · 929 Bytes
/
reset_tokens.sh
File metadata and controls
executable file
·29 lines (24 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Reset Tokens
# @raycast.mode compact
# Optional parameters:
# @raycast.icon 🔄
# @raycast.argument1 { "type": "text", "placeholder": "UserID from clipboard" }
# @raycast.argument2 { "type": "text", "placeholder": "Type: monthly or all" }
# Documentation:
# @raycast.description Reset monthly tokens or all tokens for a user
# @raycast.author Jorrit Harmamny
# @raycast.authorURL https://raycast.com/jorrit_harmamny6493459
USERID="$1"
TYPE="$2"
if [[ "$TYPE" == "monthly" ]]; then
echo "Opening monthly tokens reset for UserID: $USERID"
open "https://bolt.new/api/rate-limits/reset/$USERID/month"
elif [[ "$TYPE" == "all" ]]; then
echo "Opening all tokens reset (including rollovers) for UserID: $USERID"
open "https://bolt.new/api/rate-limits/reset/$USERID/all"
else
echo "Invalid type. Please enter 'monthly' or 'all'."
fi