55 lines
1.2 KiB
TypeScript
55 lines
1.2 KiB
TypeScript
import { cloudService } from './index'
|
|
|
|
import { IStatsChart } from 'vue3-common/types'
|
|
import { IBlogOverview } from '@/types/blog'
|
|
|
|
export const queryOverviewStatsApi = (): Promise<IBlogOverview> =>
|
|
cloudService({
|
|
url: '/blog-api/stats/overview',
|
|
method: 'get'
|
|
})
|
|
|
|
|
|
export const queryCategoryStatsApi = (): Promise<IStatsChart[]> =>
|
|
cloudService({
|
|
url: '/blog-api/stats/category',
|
|
method: 'get'
|
|
})
|
|
|
|
|
|
export const queryApprovedMonthlyStatsApi = (year: number): Promise<IStatsChart[]> =>
|
|
cloudService({
|
|
url: '/blog-api/stats/approved/monthly',
|
|
method: 'get',
|
|
params: { year }
|
|
})
|
|
|
|
|
|
export const queryVisitMonthlyStatsApi = (year: number): Promise<IStatsChart[]> =>
|
|
cloudService({
|
|
url: '/blog-api/stats/visit/monthly',
|
|
method: 'get',
|
|
params: { year }
|
|
})
|
|
|
|
|
|
export const queryVisitRankStatsApi = (): Promise<IStatsChart[]> =>
|
|
cloudService({
|
|
url: '/blog-api/stats/visit/rank',
|
|
method: 'get'
|
|
})
|
|
|
|
|
|
export const queryReadRankStatsApi = (): Promise<IStatsChart[]> =>
|
|
cloudService({
|
|
url: '/blog-api/stats/read/rank',
|
|
method: 'get'
|
|
})
|
|
|
|
|
|
export const queryCommentRankStatsApi = (): Promise<IStatsChart[]> =>
|
|
cloudService({
|
|
url: '/blog-api/stats/comment/rank',
|
|
method: 'get'
|
|
})
|