Compare commits

...

6 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
4 changed files with 9 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

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.3", "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()
} }