aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.ts
blob: 116308df8171661c9e291562c8908cb941ce7437 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
export let nobelPrizes: NobelPrize[] = [];
export async function setNobelPrizes() {
  nobelPrizes = (
    await fetch("https://api.nobelprize.org/2.1/nobelPrizes").then((res) =>
      res.json(),
    )
  ).nobelPrizes;
}

export interface NobelPrize {
  awardYear: string;
  category: { en: string; no: string; se: string };
  dateAwarded: string;
  prizeAmount: number;
  prizeAmountAdjusted: number;
}