Simple REST API for Pokemon Showdown teams
Retrieve a team by its slug.
Example:
curl https://crob.at/api/team/abc123
const response = await fetch('https://crob.at/api/team/abc123');
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://crob.at/api/team/abc123')
data = response.json()
print(data)
Response:
{
"slug": "abc123",
"name": "My Team",
"is_multi": false,
"teams": [{"paste": "..."}]
}
Create a new team.
Request:
{
"teams": [{
"paste": "Garchomp @ Choice Scarf\nAbility: Rough Skin\n..."
}]
}
Example:
curl -X POST https://crob.at/api/team \
-H "Content-Type: application/json" \
-d '{"teams": [{"paste": "Garchomp @ Choice Scarf\n..."}]}'
const response = await fetch('https://crob.at/api/team', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
teams: [{paste: 'Garchomp @ Choice Scarf\n...'}]
})
});
const {slug, url} = await response.json();
console.log(`Created: ${url}`);
import requests
response = requests.post('https://crob.at/api/team', json={
'teams': [{'paste': 'Garchomp @ Choice Scarf\n...'}]
})
data = response.json()
print(f"Created: {data['url']}")
Response:
{
"slug": "abc123",
"url": "https://crob.at/abc123"
}