From 3ef6044be93e16ebc5325921ebfcc5c89878e999 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Thu, 11 Dec 2025 23:49:13 +0500 Subject: feat: fetch data from api --- api.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 api.js (limited to 'api.js') diff --git a/api.js b/api.js new file mode 100644 index 0000000..09fa615 --- /dev/null +++ b/api.js @@ -0,0 +1,8 @@ +function getTinyEmotesUserByName(instanceUrl, name) { + return fetch(`${instanceUrl}/users.php?name=${name}`, { + "headers": { + "Accept": "application/json" + } + }).then((r) => r.json()) + .catch(err => console.error('Fetch failed:', err)); +} \ No newline at end of file -- cgit v1.2.3