PNG image buffer
Status: 400 | Response type: json{
error: "missing x query"
}
Status: 429 | Response type: json{
"error": "Too many requests, please try again later."
}
const phin = require('phin')
let fs = require('fs')
phin('https://some-random-api.ml/premium/amongus?avatar=https://cdn.discordapp.com/avatars/560789882738573324/bc220b0eeeabbe234026e4881f3c3b9c.png&username=Telk&key=hello').then(res => {
if (res.statusCode !== 200) {
console.log('Bad status code')
console.log(JSON.parse(res.body))
}
fs.writeFile('./image.gif', res.body, (err) => {
if (err) return console.log('Something went wrong when writing the file')
console.log('Image has been written')
})
})
from requests import get
from os import getcwd
URL = 'https://some-random-api.ml/premium/amongus?avatar=https://cdn.discordapp.com/avatars/560789882738573324/bc220b0eeeabbe234026e4881f3c3b9c.png&username=Telk&key=hello'
resp = get(URL)
if resp.status_code == 200:
open('image.gif', 'wb').write(resp.content)
print(f'File saved in {getcwd()}')
elif resp.status_code != 200:
jsonresp = resp.json()
print(resp.status_code)
print(jsonresp)
PNG image buffer
Status: 400 | Response type: json{
error: "missing x query"
}
Status: 429 | Response type: json{
"error": "Too many requests, please try again later."
}
const phin = require('phin')
let fs = require('fs')
phin('https://some-random-api.ml/premium/petpet?avatar=https://cdn.discordapp.com/avatars/560789882738573324/bc220b0eeeabbe234026e4881f3c3b9c.png&key=hello').then(res => {
if (res.statusCode !== 200) {
console.log('Bad status code')
console.log(JSON.parse(res.body))
}
fs.writeFile('./image.gif', res.body, (err) => {
if (err) return console.log('Something went wrong when writing the file')
console.log('Image has been written')
})
})
from requests import get
from os import getcwd
URL = 'https://some-random-api.ml/premium/petpet?avatar=https://cdn.discordapp.com/avatars/560789882738573324/bc220b0eeeabbe234026e4881f3c3b9c.png&key=hello'
resp = get(URL)
if resp.status_code == 200:
open('image.gif', 'wb').write(resp.content)
print(f'File saved in {getcwd()}')
elif resp.status_code != 200:
jsonresp = resp.json()
print(resp.status_code)
print(jsonresp)
PNG image buffer
Status: 400 | Response type: json{
"error": "missing x query"
}
Status: 429 | Response type: json{
"error": "Too many requests, please try again later."
}
For template pick a number from 1-8
PNG image buffer
Status: 400 | Response type: json{
"error": "missing x query"
}
Status: 429 | Response type: json{
"error": "Too many requests, please try again later."
}
For template pick a number from 1-7