Last active
December 13, 2022 09:12
-
-
Save frozenpandaman/d531a9a45bf13fef5ce8fbccc3fcc69c to your computer and use it in GitHub Desktop.
for mass DELETE-ing splatoon 3 battles/jobs from stat.ink
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import requests, msgpack | |
API_KEY = '' # FILL IN YOUR STAT.INK API KEY | |
shas = [ # PUT YOUR BATTLE URLS OR URL HASHES TO DELETE HERE | |
] | |
resulttype = "battle" # change this to say "salmon" if you are deleting SR jobs | |
auth = {'Authorization': f'Bearer {API_KEY}', 'Content-Type': 'application/x-msgpack'} | |
for sha in shas: | |
sha = sha.split("/")[-1] | |
a = requests.delete(f"https://stat.ink/api/v3/{resulttype}/{sha}", headers=auth) | |
print(a.status_code) # 204 if ok, 404 if failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment