文字游戏
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

43 lines
868 B

import http from './index'
export interface ScrapDto {
id: number
name: string
description: string
story: string
level: number
levelName: string
levelColor: string
attackBonus: number
defenseBonus: number
hpBonus: number
magicBonus: number
}
export interface ScrapScanResultDto {
scrap: ScrapDto
attackGain: number
defenseGain: number
hpGain: number
magicGain: number
}
export interface ScrapHistoryDto {
id: number
scrap: ScrapDto
obtainedAt: string
}
export const scrapApi = {
getScrapList: (): Promise<ScrapDto[]> => {
return http.get('/scrap/list')
},
scanScrap: (characterId: number): Promise<ScrapScanResultDto> => {
return http.post('/scrap/scan', { characterId })
},
getScrapHistory: (characterId: number): Promise<ScrapHistoryDto[]> => {
return http.get(`/scrap/history/${characterId}`)
}
}