import qs from 'querystringify' import {Base, NevoboResponse, Pagination} from '../base' import {Sporthal} from './types' export class SportHallen extends Base { /** * @param vereniging if vereniging is not valid, this request returns the first page of getAllSportHallen() */ getSportHallenForVereniging(vereniging: string): Promise> { return this.request(`competitie/sporthallen?vereniging=${vereniging}`, true); } /** * Sporthallen requires pagination, the limit per page is 50 * @param pagination */ getAllSportHallen(pagination: Pagination): Promise> { const endpoint = "competitie/sporthallen" + qs.stringify(pagination, '?'); return this.request(endpoint, true); } }