feat: integrate Firebase for authentication and data management, add GameItem type, and enhance UI with tooltips
This commit is contained in:
@@ -3,6 +3,7 @@ import { InvItemInteraction, Pet, Resources } from '../../types/Pet';
|
||||
import { PetCreationRequest } from '../../types/PetCreationRequest';
|
||||
import { PetActionGathered, PetUpdateActionRequest } from '../../types/PetAction';
|
||||
import { PetSkill, Skill } from '../../types/Skills';
|
||||
import { GameItem } from '../../types/GameItem';
|
||||
|
||||
// Get API service instance
|
||||
const api = ApiService.getInstance();
|
||||
@@ -52,8 +53,13 @@ export async function putPetItemInteract(petId: string, itemId: number, inter: I
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export async function getItemInfo(itemId: number): Promise<GameItem> {
|
||||
const response = await api.get<GameItem>(`/api/v1/gamedata/item/${itemId}`);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export async function getItemIcon(itemId: number): Promise<Blob> {
|
||||
const response = await api.get<Blob>(`/api/v1/gamedata/item/icon/${itemId}`, {
|
||||
const response = await api.get<Blob>(`/api/v1/gamedata/item/${itemId}/icon`, {
|
||||
responseType: 'blob',
|
||||
headers: {
|
||||
Accept: 'image/png'
|
||||
|
Reference in New Issue
Block a user