Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierce01 committed Aug 16, 2023
1 parent 566404f commit 4491ffe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/lib/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class Client {
mediaCategory: MediaCategory
mediaType: MediaType
download: Download
constructor(url: String, token: String) {
constructor(url: string, token: string) {
this.url = url
this.token = token

Expand Down
23 changes: 12 additions & 11 deletions src/lib/MediaCategory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@ export class MediaCategory {
}

async list(categoryID: number, language: string | 'en'): Promise<Category[]> {
const response = await this.client.call('POST', `${MediaCategoryEndpoint}`, { body: {
"category": {
"id": categoryID,
language
},
"recursionDepth": -1,
"explode": true,
"activeNode": -1,
"showInactive": true,
"showMyMedia": false
const response = await this.client.call('POST', `${MediaCategoryEndpoint}`, {
body: {
category: {
id: categoryID,
language
},
recursionDepth: -1,
explode: true,
activeNode: -1,
showInactive: true,
showMyMedia: false
}})
return await response.json() as Category[]
return await response.json()
}
}

0 comments on commit 4491ffe

Please sign in to comment.