Added ancientTrait to Card; updated README

This commit is contained in:
bradyn
2020-11-15 20:54:09 -06:00
parent c82497951d
commit 239d1b2831
6 changed files with 11 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import { IAbility } from '../interfaces/ability';
import { IAncientTrait } from '../interfaces/ancientTrait';
import { IAttack } from '../interfaces/attack';
import { ICard } from '../interfaces/card';
import { IQuery } from '../interfaces/query';
@ -9,6 +10,7 @@ import { QueryBuilder } from '../queryBuilder';
export class Card implements ICard {
ability: IAbility;
artist: string;
ancientTrait?: IAncientTrait;
attacks: IAttack[];
convertedRetreatCost: number;
evolvesFrom: string;

View File

@ -7,7 +7,7 @@ export class Client {
static async get(resource: string, params?: IQuery[] | string): Promise<any> {
let url: string = `${this.apiUrl}/${resource}`;
let config: axios.AxiosRequestConfig = {
const config: axios.AxiosRequestConfig = {
headers: {
'Content-Type': 'application/json'
}

View File

@ -0,0 +1,4 @@
export interface IAncientTrait {
name: string;
text: string;
}

View File

@ -1,10 +1,12 @@
import { IAbility } from '../interfaces/ability';
import { IAncientTrait } from './ancientTrait';
import { IAttack } from '../interfaces/attack';
import { IResistance } from '../interfaces/resistance';
import { IWeakness } from '../interfaces/weakness';
export interface ICard {
ability: IAbility;
ancientTrait?: IAncientTrait;
artist: string;
attacks: IAttack[];
convertedRetreatCost: number;

View File

@ -10,4 +10,5 @@ export interface ISet {
symbolUrl: string;
totalCards: number;
updatedAt: string;
updatedSince: string;
}