domi-btnr / ClientModBadges-API

API for getting badges from other discord client mods
https://clientmodbadges-api.herokuapp.com
12 stars 8 forks source link

Suggestion: Adding Support for BadgeDB #1

Closed wont-stream closed 9 months ago

wont-stream commented 9 months ago

simply as title says, BadgeDB support.

API Endpoints https://badgedb.katze.click/api/badge/user?id=${userid}

{
    "image": "discord cdn image link, required",
    "description": "badge tooltip/name, optional"
}

https://badgedb.katze.click/api/badge/get


[
    array of objects specified above for every user
]
wont-stream commented 9 months ago

The user will be getting a slight apo change later today It will have a key, "success" of true or false whether the user exist or not.

domi-btnr commented 9 months ago

Does your API require specific Headers? Because right now I'm getting hit with the timeout every time

const resp = await axios.get(`https://badgedb.katze.click/api/badge/user?id=${userId}`, { headers: { "Cache-Control": "no-cache" }, timeout: 5000 });
image
wont-stream commented 9 months ago

It should not require any special headers. Are you able to do any further debugging?

domi-btnr commented 9 months ago

I can later try to test it on my server rather than my Mac

domi-btnr commented 9 months ago

Somehow it fixed itself. I'll merge the PR