Remove QueryBuilder

This commit is contained in:
Tee
2021-02-26 21:24:51 -05:00
parent 5f19f8227e
commit e588d35dd9

View File

@ -1,28 +0,0 @@
import { Client } from './client';
import { Card } from './classes/card';
import { Set } from './classes/set';
import { Query } from './interfaces/query';
export class QueryBuilder {
static all<T extends Card | Set>(type: {new (): T}): Promise<T[]> {
const t = new type();
const params: Query[] = [{
name: 'pageSize',
value: 250,
}];
return Client.get(t.resource(), params);
}
static find<T extends Card | Set>(type: {new (): T}, id: string): Promise<T> {
const t = new type();
return Client.get(t.resource(), id);
}
static where<T extends Card | Set>(type: {new (): T}, params: Query[]): Promise<T[]> {
const t = new type();
return Client.get(t.resource(), params);
}
}