feat:前端部分
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { postJson } from './client'
|
||||
import type { ListByFollowingResponse, ListLatestResponse, ListLikesCountResponse } from './types'
|
||||
import type { ListByFollowingResponse, ListByPopularityResponse, ListLatestResponse, ListLikesCountResponse } from './types'
|
||||
|
||||
export function listLatest(input: { limit: number; latest_time: number }) {
|
||||
return postJson<ListLatestResponse>('/feed/listLatest', input)
|
||||
@@ -14,6 +14,10 @@ export function listLikesCount(input: { limit: number; likes_count_before?: numb
|
||||
return postJson<ListLikesCountResponse>('/feed/listLikesCount', body)
|
||||
}
|
||||
|
||||
export function listByPopularity(input: { limit: number; as_of: number; offset: number }) {
|
||||
return postJson<ListByPopularityResponse>('/feed/listByPopularity', input)
|
||||
}
|
||||
|
||||
export function listByFollowing(input: { limit: number; latest_time: number }) {
|
||||
return postJson<ListByFollowingResponse>('/feed/listByFollowing', input, { authRequired: true })
|
||||
}
|
||||
|
||||
@@ -58,6 +58,16 @@ export type ListLikesCountResponse = {
|
||||
has_more: boolean
|
||||
}
|
||||
|
||||
export type ListByPopularityResponse = {
|
||||
video_list: FeedVideoItem[]
|
||||
as_of: number
|
||||
next_offset: number
|
||||
has_more: boolean
|
||||
next_latest_popularity?: number
|
||||
next_latest_before?: string
|
||||
next_latest_id_before?: number
|
||||
}
|
||||
|
||||
export type ListByFollowingResponse = {
|
||||
video_list: FeedVideoItem[]
|
||||
next_time: number
|
||||
|
||||
Reference in New Issue
Block a user