fix: change the interface to type

This commit is contained in:
TobyG74 2024-02-28 12:16:23 +07:00
parent 66a89cdad2
commit c7ab3ca2da
4 changed files with 17 additions and 30 deletions

View File

@ -1,4 +1,4 @@
export interface getRequest {
export type getRequest = {
status: "success" | "error"
request?: {
[key: string]: string
@ -7,7 +7,7 @@ export interface getRequest {
cookie?: string
}
export interface MusicalDownResponse {
export type MusicalDownResponse = {
status: "success" | "error"
message?: string
result?: {
@ -26,7 +26,7 @@ export interface MusicalDownResponse {
}
}
export interface getMusic {
export type getMusic = {
status: "success" | "error"
result?: string
}

View File

@ -1,10 +1,10 @@
export interface SSSTikFetchTT {
export type SSSTikFetchTT = {
status: "success" | "error"
message?: string
result?: string
}
export interface SSSTikResponse {
export type SSSTikResponse = {
status: "success" | "error"
message?: string
result?: {
@ -18,12 +18,12 @@ export interface SSSTikResponse {
}
}
export interface Author {
export type Author = {
avatar: string
nickname: string
}
export interface Statistics {
export type Statistics = {
likeCount: string
commentCount: string
shareCount: string

View File

@ -1,4 +1,4 @@
export interface StalkResult {
export type StalkResult = {
status: "success" | "error"
message?: string
result?: {
@ -8,7 +8,7 @@ export interface StalkResult {
}
}
export interface Users {
export type Users = {
username: string
nickname: string
avatarLarger: string
@ -23,29 +23,16 @@ export interface Users {
nicknameModifyTime: number
}
export interface Stats {
export type Stats = {
followerCount: number
followingCount: number
heartCount: number
videoCount: number
likeCount: number
friendCount: number
// postCount: number
}
// export interface Posts {
// id: string
// desc: string
// createTime: number
// author: string
// locationCreated: string
// hashtags: string[]
// statistics: Statistics
// video: Video
// music: Music
// }
export interface Statistics {
export type Statistics = {
likeCount: number
shareCount: number
commentCount: number
@ -53,7 +40,7 @@ export interface Statistics {
favoriteCount: number
}
export interface Video {
export type Video = {
id: string
duration: string
ratio: string
@ -66,7 +53,7 @@ export interface Video {
bitrate: number
}
export interface Music {
export type Music = {
id: string
title: string
album: string

View File

@ -1,4 +1,4 @@
export interface TiktokAPIResponse {
export type TiktokAPIResponse = {
status: "success" | "error"
message?: string
result?: {
@ -19,7 +19,7 @@ export interface TiktokAPIResponse {
}
}
export interface Author {
export type Author = {
uid: number
username: string
nickname: string
@ -30,7 +30,7 @@ export interface Author {
url: string
}
export interface Statistics {
export type Statistics = {
playCount: number
downloadCount: number
shareCount: number
@ -43,7 +43,7 @@ export interface Statistics {
loseCommentCount: number
}
export interface Music {
export type Music = {
id: number
title: string
author: string