UNPKG

supercell-api-scraper

Version:

A supercell games scraper that has additional calculations and info, easy to use methods. [BETA]

39 lines (38 loc) 1.12 kB
import { z } from 'zod'; import ClashOfClans from '../models/ClashOfClans.js'; import ClashRoyale from '../models/ClashRoyale.js'; import BrawlStars from '../models/BrawlStars.js'; export default class Client { constructor(options) { this.options = z .object({ ClashOfClans: z .object({ token: z.string(), }) .or(z.null()) .default(null), ClashRoyale: z .object({ token: z.string(), }) .or(z.null()) .default(null), BrawlStars: z .object({ token: z.string(), }) .or(z.null()) .default(null), config: z .object({ debug: z.boolean().optional(), }) .optional(), }) .parse(options); this.ClashOfClans = new ClashOfClans(this); this.ClashRoyale = new ClashRoyale(this); this.BrawlStars = new BrawlStars(this); } }