Something went wrong. Try again.
A decentralized music tracking and discovery platform built on AT Protocol 🎵 forked from rocksky.app/rocksky
Something went wrong. Try again.
12345678910111213141516171819202122232425import axios from "axios";import { API_URL } from "../consts";import { Scrobble } from "../types/scrobble";
export const getProfileByDid = async (did: string) => { const response = await axios.get(`${API_URL}/users/${did}`); return response.data;};
export const getProfileStatsByDid = async (did: string) => { const response = await axios.get(`${API_URL}/users/${did}/stats`); return response.data;};
export const getRecentTracksByDid = async ( did: string, offset = 0, size = 10,): Promise<Scrobble[]> => { const response = await axios.get<Scrobble[]>( `${API_URL}/users/${did}/scrobbles?size=${size}&offset=${offset}`, ); return response.data;};