2025-03-06 22:18:15 +01:00
|
|
|
import { type KitsudevInfo } from "#Infos/Coding/KitsuDev.tsx";
|
2025-04-03 15:16:59 +02:00
|
|
|
import type { Handler } from "../..";
|
2025-02-26 23:58:49 +01:00
|
|
|
|
2025-04-03 15:16:59 +02:00
|
|
|
const username = "Taevas";
|
|
|
|
|
|
|
|
export const kitsudev: Handler = async () => {
|
|
|
|
/** https://kitsunes.dev/api/swagger#/user/userListActivityFeeds */
|
|
|
|
const kitsudev = await (await fetch(`https://kitsunes.dev/api/v1/users/${username}/activities/feeds?limit=1`)).json() as [{
|
2025-02-26 23:58:49 +01:00
|
|
|
repo: {
|
|
|
|
full_name: string
|
|
|
|
html_url: string
|
|
|
|
}
|
|
|
|
created: string
|
2025-03-02 14:37:13 +01:00
|
|
|
}];
|
2025-02-26 23:58:49 +01:00
|
|
|
|
|
|
|
const info: KitsudevInfo = {
|
|
|
|
name: kitsudev[0].repo.full_name,
|
|
|
|
url: kitsudev[0].repo.html_url,
|
|
|
|
date: kitsudev[0].created
|
|
|
|
};
|
|
|
|
|
2025-03-07 17:43:41 +01:00
|
|
|
return Response.json(info, {status: 200});
|
2025-02-26 23:58:49 +01:00
|
|
|
};
|