File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " mcutils-js-api" ,
3- "version" : " 2.0.40 " ,
3+ "version" : " 2.0.41 " ,
44 "module" : " dist/index.js" ,
55 "main" : " dist/index.js" ,
66 "types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { StatisticsResponse } from "./types/response/statistics-response";
1212import { Skin } from "./types/player/skin/skin" ;
1313import { Page } from "./types/pagination/pagination" ;
1414import { PlayerSearchEntry } from "./types/player/player-search-entry" ;
15+ import { SkinsResponsePage } from "./types/response/skins-response" ;
1516
1617type RequestOptions = RequestInit & { responseType ?: "json" | "arrayBuffer" } ;
1718
@@ -315,8 +316,8 @@ export class McUtilsAPI {
315316 * @param page the page to fetch (default: 1)
316317 * @returns the list of skins or the error (if one occurred)
317318 */
318- async fetchSkins ( page : number = 1 ) : Promise < { skins ?: Page < Skin > ; error ?: ErrorResponse } > {
319- const { data, error } = await this . request < Page < Skin > > (
319+ async fetchSkins ( page : number = 1 ) : Promise < { skins ?: SkinsResponsePage ; error ?: ErrorResponse } > {
320+ const { data, error } = await this . request < SkinsResponsePage > (
320321 `/skins${ this . buildParams ( { page : String ( page ) } ) } `
321322 ) ;
322323 return error ? { error } : { skins : data } ;
Original file line number Diff line number Diff line change 1+ import { Page } from "../pagination/pagination" ;
2+
3+ export type SkinsResponse = {
4+ imageUrl : string ;
5+ accountsUsed : number ;
6+ }
7+
8+ export type SkinsResponsePage = Page < SkinsResponse > ;
You can’t perform that action at this time.
0 commit comments