@mrmory/bggclient
Version:
Javascript client to interact with BoardGameGeek public XML API based on boardgamegeekjsclient
62 lines (52 loc) • 1.74 kB
text/typescript
import { JsonAlias, JsonClassType, JsonDeserialize, JsonManagedReference, JsonProperty } from "jackson-js";
export class BggPollDto {
name!: string;
title!: string;
totalvotes!: string;
// @JsonProperty()
// @JsonClassType({ type: () => [Array, [PollResults]] })
// @JsonDeserialize({
// //eslint-disable-next-line @typescript-eslint/no-explicit-any
// using: (items: any[]) => items[1].result
// })
// results!: PollResults[];
results!: PollResults[]
}
class PollResults {
numplayers!: number;
result!: PollResultItems[];
}
class PollResultItems{
value!: string;
numvotes!: number;
level!: number;
}