Compare commits

...

8 Commits

Author SHA1 Message Date
41d105cda8 v2.0.0-beta.2 2021-04-20 10:40:08 +02:00
73028f4803 Fixed get serie pointing the old endpoint
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-04-20 10:39:45 +02:00
6d7381de7d v2.0.0-beta.1 2021-04-20 10:07:44 +02:00
00e61b370f Fixed interface not being correctly exported
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-04-20 10:07:10 +02:00
3b6c5886ea v2.0.0-beta 2021-04-19 16:59:10 +02:00
96cbea47e2 Added Typing to exports
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-04-19 16:56:44 +02:00
ae65bd4d8e v2.0.0-alpha.3 2021-03-11 11:15:31 +01:00
d5c57fa6c7 Added simple Endpoint for strings
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
2021-03-11 11:15:11 +01:00
5 changed files with 16 additions and 4 deletions

1
.gitignore vendored
View File

@ -4,4 +4,5 @@ node_modules
*.js *.js
*.d.ts *.d.ts
!interfaces.d.ts !interfaces.d.ts
!main.d.ts
test.ts test.ts

7
interfaces.d.ts vendored
View File

@ -233,3 +233,10 @@ export interface Card<SetType extends SetResume = SetResume> extends CardResume
energyType?: 'Normal' | // https://www.tcgdex.net/database/ecard/ecard1/160 energyType?: 'Normal' | // https://www.tcgdex.net/database/ecard/ecard1/160
'Special' // https://www.tcgdex.net/database/ecard/ecard1/158 'Special' // https://www.tcgdex.net/database/ecard/ecard1/158
} }
export type StringEndpointList = Array<string>
export interface StringEndpoint {
name: string
cards: Array<CardResume>
}

4
main.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
import TCGdex from './tcgdex'
export * from './interfaces'
export default TCGdex

View File

@ -1,8 +1,8 @@
{ {
"name": "@tcgdex/sdk", "name": "@tcgdex/sdk",
"version": "2.0.0-alpha.2", "version": "2.0.0-beta.2",
"main": "./tcgdex.js", "main": "./tcgdex.js",
"types": "./tcgdex.d.ts", "types": "./main.d.ts",
"repository": "https://github.com/tcgdex/javascript-sdk.git", "repository": "https://github.com/tcgdex/javascript-sdk.git",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {

View File

@ -53,12 +53,12 @@ export default class TCGdex {
} }
public async getSerie(expansion: string): Promise<Serie | undefined> { public async getSerie(expansion: string): Promise<Serie | undefined> {
const req = this.rwgr<Serie>(`/expansions/${expansion}/`) const req = this.rwgr<Serie>(`/series/${expansion}/`)
return req.get() return req.get()
} }
public async getSeries(): Promise<SerieList | undefined> { public async getSeries(): Promise<SerieList | undefined> {
const req = this.rwgr<SerieList>(`/expansions/`) const req = this.rwgr<SerieList>(`/series/`)
return req.get() return req.get()
} }