24 lines
478 B
TypeScript
24 lines
478 B
TypeScript
/**
|
|
* Social API Service
|
|
* v0.203 Lot L: Trending hashtags
|
|
*/
|
|
|
|
import { apiClient } from './client';
|
|
|
|
export interface TrendingTag {
|
|
tag: string;
|
|
count: number;
|
|
}
|
|
|
|
export interface TrendingResponse {
|
|
tags: TrendingTag[];
|
|
}
|
|
|
|
export const socialApi = {
|
|
async getTrending(limit = 10): Promise<TrendingTag[]> {
|
|
const response = await apiClient.get<TrendingResponse>('/social/trending', {
|
|
params: { limit },
|
|
});
|
|
return response.data?.tags ?? [];
|
|
},
|
|
};
|