Split up our plex and tmdb classes into more logical files with a common media class that it extends off of.
This commit is contained in:
19
seasoned_api/src/media_classes/media.js
Normal file
19
seasoned_api/src/media_classes/media.js
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
class Media {
|
||||
constructor(title, year, type) {
|
||||
this.title = title;
|
||||
this.year = year;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
toString() {
|
||||
return `N: ${this.title} | Y: ${this.year} | T: ${this.type}`;
|
||||
}
|
||||
|
||||
print() {
|
||||
/* eslint-disable no-console */
|
||||
console.log(this.toString());
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Media;
|
||||
Reference in New Issue
Block a user