Skip to content

Instantly share code, notes, and snippets.

@frozenpandaman
Last active December 13, 2022 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frozenpandaman/d531a9a45bf13fef5ce8fbccc3fcc69c to your computer and use it in GitHub Desktop.
Save frozenpandaman/d531a9a45bf13fef5ce8fbccc3fcc69c to your computer and use it in GitHub Desktop.
for mass DELETE-ing splatoon 3 battles/jobs from stat.ink
#!/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