diff --git a/bin/dev b/bin/dev new file mode 100644 index 0000000..a9c8fb2 --- /dev/null +++ b/bin/dev @@ -0,0 +1,2 @@ +require('dotenv/config') +require('../src/moviedb.js') \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index fcf3619..7abae85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,9 +1,505 @@ { "name": "node-moviedb-cli", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "node-moviedb-cli", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "commander": "^6.1.0", + "dotenv": "^8.2.0", + "node-notifier": "^8.0.0", + "ora": "^5.1.0" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" + }, + "node_modules/chalk/node_modules/ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dependencies": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/chalk/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/chalk/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/chalk/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", + "integrity": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/dotenv": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", + "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=" + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-docker": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", + "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/node-notifier": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.2.tgz", + "integrity": "sha512-oJP/9NAdd9+x2Q+rfphB2RJCHjod70RcRLjosiPMMu5gjIfwVnOUGq2nbTjTUbmy0DJ/tFIVT30+Qe3nzl4TJg==", + "dependencies": { + "growly": "^1.3.0", + "is-wsl": "^2.2.0", + "semver": "^7.3.2", + "shellwords": "^0.1.1", + "uuid": "^8.3.0", + "which": "^2.0.2" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/ora/node_modules/defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dependencies": { + "clone": "^1.0.2" + } + }, + "node_modules/ora/node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/ora/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, + "node_modules/ora/node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shellwords": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==" + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "node_modules/uuid": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", + "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + } + }, "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "chalk": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", @@ -55,10 +551,15 @@ } } }, + "cli-spinners": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.1.tgz", + "integrity": "sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==" + }, "commander": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.1.0.tgz", - "integrity": "sha512-wl7PNrYWd2y5mp1OK/LhTlv8Ff4kQJQRXXAvF+uU/TPNiVJUxZLRYGj/B0y/lPGAVcSbJqH2Za/cvHmrPMC8mA==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==" }, "dotenv": { "version": "8.2.0", @@ -70,11 +571,26 @@ "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=" }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, "is-docker": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==" }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==" + }, "is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -88,10 +604,19 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + } + }, "node-notifier": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.0.tgz", - "integrity": "sha512-46z7DUmcjoYdaWyXouuFNNfUo6eFa94t23c53c+lG/9Cvauk4a98rAUp9672X5dxGdQmLpPzTxzu8f/OeEPaFA==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.2.tgz", + "integrity": "sha512-oJP/9NAdd9+x2Q+rfphB2RJCHjod70RcRLjosiPMMu5gjIfwVnOUGq2nbTjTUbmy0DJ/tFIVT30+Qe3nzl4TJg==", "requires": { "growly": "^1.3.0", "is-wsl": "^2.2.0", @@ -102,48 +627,21 @@ } }, "ora": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.1.0.tgz", - "integrity": "sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", "requires": { + "bl": "^4.1.0", "chalk": "^4.1.0", "cli-cursor": "^3.1.0", - "cli-spinners": "^2.4.0", + "cli-spinners": "^2.5.0", "is-interactive": "^1.0.0", - "log-symbols": "^4.0.0", - "mute-stream": "0.0.8", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", "strip-ansi": "^6.0.0", "wcwidth": "^1.0.1" }, "dependencies": { - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" - }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" - }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, "cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", @@ -152,29 +650,11 @@ "restore-cursor": "^3.1.0" } }, - "cli-spinners": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.4.0.tgz", - "integrity": "sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA==" - }, "clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "defaults": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", @@ -183,34 +663,16 @@ "clone": "^1.0.2" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, "is-interactive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==" }, - "log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", - "requires": { - "chalk": "^4.0.0" - } - }, "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" - }, "onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", @@ -241,14 +703,6 @@ "ansi-regex": "^5.0.0" } }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - }, "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -259,6 +713,21 @@ } } }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, "semver": { "version": "7.3.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", @@ -269,6 +738,19 @@ "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==" }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, "uuid": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", diff --git a/package.json b/package.json index f20c9c6..8b2c59b 100644 --- a/package.json +++ b/package.json @@ -7,13 +7,13 @@ "cli app", "assembler school" ], - "author": "Dani Lucaci ", + "author": "Gonzalo García ", "license": "MIT", "private": true, "main": "src/moviedb.js", "repository": { "type": "git", - "url": "https://github.com/assembler-school/node-moviedb-cli.git" + "url": "https://github.com/gonzalogarahuetes/node-moviedb-cli.git" }, "scripts": {}, "dependencies": { diff --git a/src/files/movies/movies.json b/src/files/movies/movies.json new file mode 100644 index 0000000..e69de29 diff --git a/src/files/movies/now-playing-movies.json b/src/files/movies/now-playing-movies.json new file mode 100644 index 0000000..0526274 --- /dev/null +++ b/src/files/movies/now-playing-movies.json @@ -0,0 +1,322 @@ +[ + { + "adult": false, + "backdrop_path": "/vDSasKnGHsRfX0kTAu5rTl0TQzG.jpg", + "genre_ids": [10751, 35], + "id": 802217, + "original_language": "en", + "original_title": "8-Bit Christmas", + "overview": "In suburban Chicago during the late 1980s, ten-year-old Jake Doyle embarks on a herculean quest to get the latest and greatest video game system for Christmas.", + "popularity": 722.609, + "poster_path": "/5YwaISdOwp8Zu6O7kwBeUn8a7Pu.jpg", + "release_date": "2021-11-25", + "title": "8-Bit Christmas", + "video": false, + "vote_average": 6.4, + "vote_count": 94 + }, + { + "adult": false, + "backdrop_path": "/pKgfWzxOpvGV3MQ0kLjLdjKAzUe.jpg", + "genre_ids": [18, 80], + "id": 785538, + "original_language": "pt", + "original_title": "7 Prisioneiros", + "overview": "An impoverished teen seeking to escape the clutches of a human trafficker must weigh living up to his moral code against his struggle to survive.", + "popularity": 879.851, + "poster_path": "/5svMKCGnR6Yvj8wxldvDvgUi0Jk.jpg", + "release_date": "2021-10-22", + "title": "7 Prisoners", + "video": false, + "vote_average": 7.1, + "vote_count": 136 + }, + { + "adult": false, + "backdrop_path": "/7WJjFviFBffEJvkAms4uWwbcVUk.jpg", + "genre_ids": [12, 14, 35, 28], + "id": 451048, + "original_language": "en", + "original_title": "Jungle Cruise", + "overview": "Dr. Lily Houghton enlists the aid of wisecracking skipper Frank Wolff to take her down the Amazon in his dilapidated boat. Together, they search for an ancient tree that holds the power to heal – a discovery that will change the future of medicine.", + "popularity": 692.35, + "poster_path": "/9dKCd55IuTT5QRs989m9Qlb7d2B.jpg", + "release_date": "2021-07-28", + "title": "Jungle Cruise", + "video": false, + "vote_average": 7.7, + "vote_count": 3516 + }, + { + "adult": false, + "backdrop_path": "/b6UXXuRQL3teEMVKTyae5hTq8ke.jpg", + "genre_ids": [35], + "id": 671043, + "original_language": "fr", + "original_title": "Pourris gâtés", + "overview": "The billionaire is tired of the whims of his own children and decides to teach them a lesson. He announces to them that he has become bankrupt. Now spoiled teenagers will have to do what they have never done: go to work, learn to love and value life.", + "popularity": 690.051, + "poster_path": "/nW5LHayHlbavYD6XRM9SjKi55uu.jpg", + "release_date": "2021-09-15", + "title": "Spoiled Brats", + "video": false, + "vote_average": 6.1, + "vote_count": 139 + }, + { + "adult": false, + "backdrop_path": "/d0mpUFKzoPwF1KsdjHpkkaYSvKm.jpg", + "genre_ids": [37], + "id": 618162, + "original_language": "en", + "original_title": "The Harder They Fall", + "overview": "Gunning for revenge, outlaw Nat Love saddles up with his gang to take down enemy Rufus Buck, a ruthless crime boss who just got sprung from prison.", + "popularity": 688.126, + "poster_path": "/su9WzL7lwUZPhjH6eZByAYFx2US.jpg", + "release_date": "2021-10-22", + "title": "The Harder They Fall", + "video": false, + "vote_average": 6.8, + "vote_count": 421 + }, + { + "adult": false, + "backdrop_path": "/2OFg5p9yarI5zZsUWKCRgBgPctj.jpg", + "genre_ids": [28, 12], + "id": 568620, + "original_language": "en", + "original_title": "Snake Eyes: G.I. Joe Origins", + "overview": "After saving the life of their heir apparent, tenacious loner Snake Eyes is welcomed into an ancient Japanese clan called the Arashikage where he is taught the ways of the ninja warrior. But, when secrets from his past are revealed, Snake Eyes' honor and allegiance will be tested – even if that means losing the trust of those closest to him.", + "popularity": 637.219, + "poster_path": "/uIXF0sQGXOxQhbaEaKOi2VYlIL0.jpg", + "release_date": "2021-07-22", + "title": "Snake Eyes: G.I. Joe Origins", + "video": false, + "vote_average": 6.8, + "vote_count": 872 + }, + { + "adult": false, + "backdrop_path": "/gGTCDNEvwG848u34Op1nZNALLUr.jpg", + "genre_ids": [28, 80, 53], + "id": 385128, + "original_language": "en", + "original_title": "F9", + "overview": "Dominic Toretto and his crew battle the most skilled assassin and high-performance driver they've ever encountered: his forsaken brother.", + "popularity": 624.209, + "poster_path": "/bOFaAXmWWXC3Rbv4u4uM9ZSzRXP.jpg", + "release_date": "2021-05-19", + "title": "F9", + "video": false, + "vote_average": 7.4, + "vote_count": 4540 + }, + { + "adult": false, + "backdrop_path": "/jlGmlFOcfo8n5tURmhC7YVd4Iyy.jpg", + "genre_ids": [28, 12, 14], + "id": 436969, + "original_language": "en", + "original_title": "The Suicide Squad", + "overview": "Supervillains Harley Quinn, Bloodsport, Peacemaker and a collection of nutty cons at Belle Reve prison join the super-secret, super-shady Task Force X as they are dropped off at the remote, enemy-infused island of Corto Maltese.", + "popularity": 602.307, + "poster_path": "/kb4s0ML0iVZlG6wAKbbs9NAm6X.jpg", + "release_date": "2021-07-28", + "title": "The Suicide Squad", + "video": false, + "vote_average": 7.8, + "vote_count": 4971 + }, + { + "adult": false, + "backdrop_path": "/eBGKU0ZLJmxtVtzESTB1mfllX1J.jpg", + "genre_ids": [80, 28, 53], + "id": 630004, + "original_language": "en", + "original_title": "The Vault", + "overview": "When an engineer learns of a mysterious, impenetrable fortress hidden under The Bank of Spain, he joins a crew of master thieves who plan to steal the legendary lost treasure locked inside while the whole country is distracted by Spain's World Cup Final. With thousands of soccer fans cheering in the streets, and security forces closing in, the crew have just minutes to pull off the score of a lifetime.", + "popularity": 578.445, + "poster_path": "/kWhXubAiIcHW0xn5GThflqaKZqh.jpg", + "release_date": "2021-03-03", + "title": "The Vault", + "video": false, + "vote_average": 7.1, + "vote_count": 453 + }, + { + "adult": false, + "backdrop_path": "/w2jm8I0K83aZzHcI4Acl8DtuXCt.jpg", + "genre_ids": [16, 10751, 12, 35], + "id": 675445, + "original_language": "en", + "original_title": "PAW Patrol: The Movie", + "overview": "Ryder and the pups are called to Adventure City to stop Mayor Humdinger from turning the bustling metropolis into a state of chaos.", + "popularity": 576.325, + "poster_path": "/ic0intvXZSfBlYPIvWXpU1ivUCO.jpg", + "release_date": "2021-08-09", + "title": "PAW Patrol: The Movie", + "video": false, + "vote_average": 7.6, + "vote_count": 739 + }, + { + "adult": false, + "backdrop_path": "/cDVWsqsnGwIUqOSzAuDS0PIhNdW.jpg", + "genre_ids": [18, 10749, 10402], + "id": 424277, + "original_language": "en", + "original_title": "Annette", + "overview": "The story of Henry, a stand-up comedian with a fierce sense of humour and Ann, a singer of international renown. In the spotlight, they are the perfect couple, healthy, happy, and glamourous. The birth of their first child, Annette, a mysterious girl with an exceptional destiny, will change their lives.", + "popularity": 563.25, + "poster_path": "/4FTnypxpGltJdIARrfFsP31pGTp.jpg", + "release_date": "2021-07-06", + "title": "Annette", + "video": false, + "vote_average": 7.1, + "vote_count": 295 + }, + { + "adult": false, + "backdrop_path": "/7OcRErUXXdAVAHg6y5cjn56ivtu.jpg", + "genre_ids": [27, 9648, 53], + "id": 576845, + "original_language": "en", + "original_title": "Last Night in Soho", + "overview": "A young girl, passionate about fashion design, is mysteriously able to enter the 1960s where she encounters her idol, a dazzling wannabe singer. But 1960s London is not what it seems, and time seems to be falling apart with shady consequences.", + "popularity": 550.558, + "poster_path": "/ahbwIJl7T0D34m3sPKlBaCqs2xH.jpg", + "release_date": "2021-10-21", + "title": "Last Night in Soho", + "video": false, + "vote_average": 7.6, + "vote_count": 750 + }, + { + "adult": false, + "backdrop_path": "/wfrfxivLOBtGMC98tIr2LSOeKSe.jpg", + "genre_ids": [16, 12, 35, 10751], + "id": 639721, + "original_language": "en", + "original_title": "The Addams Family 2", + "overview": "The Addams get tangled up in more wacky adventures and find themselves involved in hilarious run-ins with all sorts of unsuspecting characters.", + "popularity": 548.778, + "poster_path": "/ld7YB9vBRp1GM1DT3KmFWSmtBPB.jpg", + "release_date": "2021-10-01", + "title": "The Addams Family 2", + "video": false, + "vote_average": 7.3, + "vote_count": 638 + }, + { + "adult": false, + "backdrop_path": "/keIxh0wPr2Ymj0Btjh4gW7JJ89e.jpg", + "genre_ids": [28, 12, 878], + "id": 497698, + "original_language": "en", + "original_title": "Black Widow", + "overview": "Natasha Romanoff, also known as Black Widow, confronts the darker parts of her ledger when a dangerous conspiracy with ties to her past arises. Pursued by a force that will stop at nothing to bring her down, Natasha must deal with her history as a spy and the broken relationships left in her wake long before she became an Avenger.", + "popularity": 621.083, + "poster_path": "/qAZ0pzat24kLdO3o8ejmbLxyOac.jpg", + "release_date": "2021-07-07", + "title": "Black Widow", + "video": false, + "vote_average": 7.6, + "vote_count": 6254 + }, + { + "adult": false, + "backdrop_path": "/gxr3YtExqUPCJCj9GL1FXNcX9Fl.jpg", + "genre_ids": [878, 53, 9648], + "id": 675319, + "original_language": "en", + "original_title": "Zone 414", + "overview": "In the near future on a colony of state-of-the-art robots, a private investigator is hired by the colony's creator to bring his missing daughter home.", + "popularity": 519.377, + "poster_path": "/wIm5S6Blkb0qDMTGVu80VWSrQV1.jpg", + "release_date": "2021-09-03", + "title": "Zone 414", + "video": false, + "vote_average": 5.6, + "vote_count": 108 + }, + { + "adult": false, + "backdrop_path": "/kmuSGNlF9mfNHIDOEVEWPj6f3Ak.jpg", + "genre_ids": [35, 80], + "id": 337404, + "original_language": "en", + "original_title": "Cruella", + "overview": "In 1970s London amidst the punk rock revolution, a young grifter named Estella is determined to make a name for herself with her designs. She befriends a pair of young thieves who appreciate her appetite for mischief, and together they are able to build a life for themselves on the London streets. One day, Estella’s flair for fashion catches the eye of the Baroness von Hellman, a fashion legend who is devastatingly chic and terrifyingly haute. But their relationship sets in motion a course of events and revelations that will cause Estella to embrace her wicked side and become the raucous, fashionable and revenge-bent Cruella.", + "popularity": 508.536, + "poster_path": "/wToO8opxkGwKgSfJ1JK8tGvkG6U.jpg", + "release_date": "2021-05-26", + "title": "Cruella", + "video": false, + "vote_average": 8.2, + "vote_count": 6116 + }, + { + "adult": false, + "backdrop_path": "/9OE62lhp5FPNJMfKXodegVLjHUA.jpg", + "genre_ids": [16, 10751], + "id": 823609, + "original_language": "en", + "original_title": "Monster Family 2", + "overview": "To free Baba Yaga and Renfield from the clutches of Monster Hunter Mila Starr, the Wishbone Family once more transforms into a Vampire, Frankenstein's Monster, a Mummy and a Werewolf. Aided and abetted by their three pet bats, our Monster Family zooms around the world again to save their friends, make new monstrous acquaintances and finally come to the realization that ‘Nobody’s Perfect’ – even those with flaws can find happiness.", + "popularity": 575.971, + "poster_path": "/em2NLSbVj49NjpdqmaKYuqKYZET.jpg", + "release_date": "2021-01-13", + "title": "Monster Family 2", + "video": false, + "vote_average": 7.6, + "vote_count": 16 + }, + { + "adult": false, + "backdrop_path": "/8s4h9friP6Ci3adRGahHARVd76E.jpg", + "genre_ids": [16, 10751, 35, 878], + "id": 379686, + "original_language": "en", + "original_title": "Space Jam: A New Legacy", + "overview": "When LeBron and his young son Dom are trapped in a digital space by a rogue A.I., LeBron must get them home safe by leading Bugs, Lola Bunny and the whole gang of notoriously undisciplined Looney Tunes to victory over the A.I.'s digitized champions on the court. It's Tunes versus Goons in the highest-stakes challenge of his life.", + "popularity": 506.247, + "poster_path": "/5bFK5d3mVTAvBCXi5NPWH0tYjKl.jpg", + "release_date": "2021-07-08", + "title": "Space Jam: A New Legacy", + "video": false, + "vote_average": 7.2, + "vote_count": 2668 + }, + { + "adult": false, + "backdrop_path": "/9yBVqNruk6Ykrwc32qrK2TIE5xw.jpg", + "genre_ids": [28, 14, 12], + "id": 460465, + "original_language": "en", + "original_title": "Mortal Kombat", + "overview": "Washed-up MMA fighter Cole Young, unaware of his heritage, and hunted by Emperor Shang Tsung's best warrior, Sub-Zero, seeks out and trains with Earth's greatest champions as he prepares to stand against the enemies of Outworld in a high stakes battle for the universe.", + "popularity": 501.306, + "poster_path": "/nkayOAUBUu4mMvyNf9iHSUiPjF1.jpg", + "release_date": "2021-04-07", + "title": "Mortal Kombat", + "video": false, + "vote_average": 7.3, + "vote_count": 4121 + }, + { + "adult": false, + "backdrop_path": "/tDYwYktjFmpj92S2Qn4T3BcRgL.jpg", + "genre_ids": [27, 53], + "id": 610253, + "original_language": "en", + "original_title": "Halloween Kills", + "overview": "Minutes after Laurie Strode, her daughter Karen and granddaughter Allyson left masked monster Michael Myers caged and burning in Laurie's basement, Laurie is rushed to the hospital with life-threatening injuries, believing she finally killed her lifelong tormentor. But when Michael manages to free himself from Laurie's trap, his ritual bloodbath resumes. As Laurie fights her pain and prepares to defend herself against him, she inspires all of Haddonfield to rise up against their unstoppable monster. The Strode women join a group of other survivors of Michael's first rampage who decide to take matters into their own hands, forming a vigilante mob that sets out to hunt Michael down, once and for all.", + "popularity": 479.704, + "poster_path": "/ir9eyz1mtgsohjvo7UYtqUfFuES.jpg", + "release_date": "2021-10-14", + "title": "Halloween Kills", + "video": false, + "vote_average": 6.9, + "vote_count": 1319 + } +] diff --git a/src/files/movies/popular-movies.json b/src/files/movies/popular-movies.json new file mode 100644 index 0000000..4e14210 --- /dev/null +++ b/src/files/movies/popular-movies.json @@ -0,0 +1 @@ +[{"adult":false,"backdrop_path":"/70nxSw3mFBsGmtkvcs91PbjerwD.jpg","genre_ids":[878,28,12],"id":580489,"original_language":"en","original_title":"Venom: Let There Be Carnage","overview":"After finding a host body in investigative reporter Eddie Brock, the alien symbiote must face a new enemy, Carnage, the alter ego of serial killer Cletus Kasady.","popularity":8633.976,"poster_path":"/rjkmN1dniUHVYAtwuV3Tji7FsDO.jpg","release_date":"2021-09-30","title":"Venom: Let There Be Carnage","video":false,"vote_average":7.2,"vote_count":4398},{"adult":false,"backdrop_path":"/5uVhMGsps81CN0S4U9NF0Z4tytG.jpg","genre_ids":[28,35,80,53],"id":512195,"original_language":"en","original_title":"Red Notice","overview":"An Interpol-issued Red Notice is a global alert to hunt and capture the world's most wanted. But when a daring heist brings together the FBI's top profiler and two rival criminals, there's no telling what will happen.","popularity":4825.133,"poster_path":"/q2d56YvJ3s9W73lqrk16Nzcc7xD.jpg","release_date":"2021-11-04","title":"Red Notice","video":false,"vote_average":6.8,"vote_count":1970},{"adult":false,"backdrop_path":"/cinER0ESG0eJ49kXlExM0MEWGxW.jpg","genre_ids":[28,12,14],"id":566525,"original_language":"en","original_title":"Shang-Chi and the Legend of the Ten Rings","overview":"Shang-Chi must confront the past he thought he left behind when he is drawn into the web of the mysterious Ten Rings organization.","popularity":3189.442,"poster_path":"/1BIoJGKbXjdFDAqUEiA2VHqkK1Z.jpg","release_date":"2021-09-01","title":"Shang-Chi and the Legend of the Ten Rings","video":false,"vote_average":7.8,"vote_count":4201},{"adult":false,"backdrop_path":"/5RuR7GhOI5fElADXZb0X2sr9w5n.jpg","genre_ids":[16,35,10751,14,10402],"id":568124,"original_language":"en","original_title":"Encanto","overview":"The tale of an extraordinary family, the Madrigals, who live hidden in the mountains of Colombia, in a magical house, in a vibrant town, in a wondrous, charmed place called an Encanto. The magic of the Encanto has blessed every child in the family with a unique gift from super strength to the power to heal—every child except one, Mirabel. But when she discovers that the magic surrounding the Encanto is in danger, Mirabel decides that she, the only ordinary Madrigal, might just be her exceptional family's last hope.","popularity":2989.673,"poster_path":"/4j0PNHkMr5ax3IA8tjtxcmPU3QT.jpg","release_date":"2021-11-24","title":"Encanto","video":false,"vote_average":7.4,"vote_count":307},{"adult":false,"backdrop_path":"/zBkHCpLmHjW2uVURs5uZkaVmgKR.jpg","genre_ids":[16,35,10751],"id":585245,"original_language":"en","original_title":"Clifford the Big Red Dog","overview":"As Emily struggles to fit in at home and at school, she discovers a small red puppy who is destined to become her best friend. When Clifford magically undergoes one heck of a growth spurt, becomes a gigantic dog and attracts the attention of a genetics company, Emily and her Uncle Casey have to fight the forces of greed as they go on the run across New York City. Along the way, Clifford affects the lives of everyone around him and teaches Emily and her uncle the true meaning of acceptance and unconditional love.","popularity":3280.16,"poster_path":"/ygPTrycbMSFDc5zUpy4K5ZZtQSC.jpg","release_date":"2021-11-10","title":"Clifford the Big Red Dog","video":false,"vote_average":7.5,"vote_count":530},{"adult":false,"backdrop_path":"/mFbS5TwN95BcSEfiztdchLgTQ0v.jpg","genre_ids":[28,18,36],"id":617653,"original_language":"en","original_title":"The Last Duel","overview":"King Charles VI declares that Knight Jean de Carrouges settle his dispute with his squire, Jacques Le Gris, by challenging him to a duel.","popularity":3256.364,"poster_path":"/zjrJE0fpzPvX8saJXj8VNfcjBoU.jpg","release_date":"2021-10-13","title":"The Last Duel","video":false,"vote_average":7.6,"vote_count":870},{"adult":false,"backdrop_path":"/VlHt27nCqOuTnuX6bku8QZapzO.jpg","genre_ids":[28,12,878],"id":634649,"original_language":"en","original_title":"Spider-Man: No Way Home","overview":"Peter Parker is unmasked and no longer able to separate his normal life from the high-stakes of being a super-hero. When he asks for help from Doctor Strange the stakes become even more dangerous, forcing him to discover what it truly means to be Spider-Man.","popularity":2774.306,"poster_path":"/1g0dhYtq4irTY1GPXvft6k4YLjm.jpg","release_date":"2021-12-15","title":"Spider-Man: No Way Home","video":false,"vote_average":8.4,"vote_count":42},{"adult":false,"backdrop_path":"/iUeeZ5PWfZGgUtCJfwcgmCfdzoI.jpg","genre_ids":[16,878,10751,35],"id":482321,"original_language":"en","original_title":"Ron's Gone Wrong","overview":"In a world where walking, talking, digitally connected bots have become children's best friends, an 11-year-old finds that his robot buddy doesn't quite work the same as the others do.","popularity":2662.308,"poster_path":"/gA9QxSravC2EVEkEKgyEmDrfL0e.jpg","release_date":"2021-10-15","title":"Ron's Gone Wrong","video":false,"vote_average":8.5,"vote_count":320},{"adult":false,"backdrop_path":"/xGrTm3J0FTafmuQ85vF7ZCw94x6.jpg","genre_ids":[18,36,12],"id":589761,"original_language":"ru","original_title":"Чернобыль","overview":"The aftermath of a shocking explosion at the Chernobyl nuclear power station made hundreds of people sacrifice their lives to clean up the site of the catastrophe and to successfully prevent an even bigger disaster that could have turned a large part of the European continent into an uninhabitable exclusion zone. This is their story.","popularity":2438.508,"poster_path":"/kfQJQWFEoWRVBH8FUKnT0HX1yRS.jpg","release_date":"2021-04-15","title":"Chernobyl: Abyss","video":false,"vote_average":6.3,"vote_count":235},{"adult":false,"backdrop_path":"/dnxrremCrghG7z97zDeGPNrl75A.jpg","genre_ids":[12,28,53],"id":370172,"original_language":"en","original_title":"No Time to Die","overview":"Bond has left active service and is enjoying a tranquil life in Jamaica. His peace is short-lived when his old friend Felix Leiter from the CIA turns up asking for help. The mission to rescue a kidnapped scientist turns out to be far more treacherous than expected, leading Bond onto the trail of a mysterious villain armed with dangerous new technology.","popularity":1999.424,"poster_path":"/iUgygt3fscRoKWCV1d0C7FbM9TP.jpg","release_date":"2021-09-29","title":"No Time to Die","video":false,"vote_average":7.6,"vote_count":2509},{"adult":false,"backdrop_path":"/lyvszvJJqqI8aqBJ70XzdCNoK0y.jpg","genre_ids":[28,12,878,18,14],"id":524434,"original_language":"en","original_title":"Eternals","overview":"The Eternals are a team of ancient aliens who have been living on Earth in secret for thousands of years. When an unexpected tragedy forces them out of the shadows, they are forced to reunite against mankind’s most ancient enemy, the Deviants.","popularity":1544.509,"poster_path":"/6AdXwFTRTAzggD2QUTt5B7JFGKL.jpg","release_date":"2021-11-03","title":"Eternals","video":false,"vote_average":7.1,"vote_count":1401},{"adult":false,"backdrop_path":"/uWGPC7j70LE64nbetxQGSSYJO53.jpg","genre_ids":[53,10752],"id":762433,"original_language":"en","original_title":"Zeros and Ones","overview":"Called to Rome to stop an imminent terrorist bombing, a soldier desperately seeks news of his imprisoned brother — a rebel with knowledge that could thwart the attack. Navigating the capital's darkened streets, he races to a series of ominous encounters to keep the Vatican from being blown to bits.","popularity":1390.14,"poster_path":"/wrClTreFxBtxo2XhHQf9GtUPa3x.jpg","release_date":"2021-11-18","title":"Zeros and Ones","video":false,"vote_average":5.7,"vote_count":66},{"adult":false,"backdrop_path":"/oE6bhqqVFyIECtBzqIuvh6JdaB5.jpg","genre_ids":[878,18,12],"id":522402,"original_language":"en","original_title":"Finch","overview":"On a post-apocalyptic Earth, a robot, built to protect the life of his dying creator's beloved dog, learns about life, love, friendship, and what it means to be human.","popularity":1481.686,"poster_path":"/jKuDyqx7jrjiR9cDzB5pxzhJAdv.jpg","release_date":"2021-11-04","title":"Finch","video":false,"vote_average":8.2,"vote_count":1418},{"adult":false,"backdrop_path":"/h3HsfV8Kn9Sz2QWUYYdP5ya23hx.jpg","genre_ids":[878,12],"id":438631,"original_language":"en","original_title":"Dune","overview":"Paul Atreides, a brilliant and gifted young man born into a great destiny beyond his understanding, must travel to the most dangerous planet in the universe to ensure the future of his family and his people. As malevolent forces explode into conflict over the planet's exclusive supply of the most precious resource in existence-a commodity capable of unlocking humanity's greatest potential-only those who can conquer their fear will survive.","popularity":1216.123,"poster_path":"/d5NXSklXo0qyIYkgV94XAgMIckC.jpg","release_date":"2021-09-15","title":"Dune","video":false,"vote_average":8,"vote_count":4697},{"adult":false,"backdrop_path":"/8Y43POKjjKDGI9MH89NW0NAzzp8.jpg","genre_ids":[35,28,12,878],"id":550988,"original_language":"en","original_title":"Free Guy","overview":"A bank teller called Guy realizes he is a background character in an open world video game called Free City that will soon go offline.","popularity":1204.749,"poster_path":"/xmbU4JTUm8rsdtn7Y3Fcm30GpeT.jpg","release_date":"2021-08-11","title":"Free Guy","video":false,"vote_average":7.8,"vote_count":4061},{"adult":false,"backdrop_path":"/39EQTf94Lckdo8yzS1CdWQSgmen.jpg","genre_ids":[27,9648,53],"id":609972,"original_language":"en","original_title":"Paranormal Activity: Next of Kin","overview":"Margot, a documentary filmmaker, heads to a secluded Amish community in the hopes of learning about her long-lost mother and extended family. Following a string of strange occurrences and discoveries, she comes to realize this community may not be what it seems.","popularity":1592.396,"poster_path":"/bXAVveHiLotZbWdg3PKGhAzxYKP.jpg","release_date":"2021-10-29","title":"Paranormal Activity: Next of Kin","video":false,"vote_average":6.7,"vote_count":146},{"adult":false,"backdrop_path":"/1zgob2Z8xVE3RZUgOKnHKcVPzOE.jpg","genre_ids":[16,35,14],"id":877183,"original_language":"en","original_title":"The Simpsons in Plusaversary","overview":"The Simpsons host a Disney+ Day party and everyone is on the list… except Homer. With friends from across the service and music fit for a Disney Princess, Plusaversary is Springfield's event of the year.","popularity":1194.655,"poster_path":"/9xaAT3V3I9xxqnNiEjCivNFfdlh.jpg","release_date":"2021-11-12","title":"The Simpsons in Plusaversary","video":false,"vote_average":6.7,"vote_count":156},{"adult":false,"backdrop_path":"/4EJSMQOM1bZPHvzqAQe87suBxdf.jpg","genre_ids":[10752,36,18],"id":885110,"original_language":"en","original_title":"Amina","overview":"In 16th-century Zazzau, now Zaria, Nigeria, Amina must utilize her military skills and tactics to defend her family's kingdom. Based on a true story.","popularity":1255.799,"poster_path":"/hMIQiwLpBfTfe3ZbRlNx4225Mgg.jpg","release_date":"2021-11-04","title":"Amina","video":false,"vote_average":6.3,"vote_count":55},{"adult":false,"backdrop_path":"/6A5ugY49ukHmMLaMRwkjaKouzCn.jpg","genre_ids":[10749,35,18],"id":810873,"original_language":"en","original_title":"Single All the Way","overview":"Desperate to avoid his family’s judgment about his perpetual single status, Peter convinces his best friend Nick to join him for the holidays and pretend that they’re now in a relationship. But when Peter’s mother sets him up on a blind date with her handsome trainer James, the plan goes awry.","popularity":1150.081,"poster_path":"/bfZPNzAwUQZ6FZQi1d136KLr3wl.jpg","release_date":"2021-12-02","title":"Single All the Way","video":false,"vote_average":6.4,"vote_count":109},{"adult":false,"backdrop_path":"/xPpXYnCWfjkt3zzE0dpCNME1pXF.jpg","genre_ids":[16,28,12,14],"id":635302,"original_language":"ja","original_title":"劇場版「鬼滅の刃」無限列車編","overview":"Tanjirō Kamado, joined with Inosuke Hashibira, a boy raised by boars who wears a boar's head, and Zenitsu Agatsuma, a scared boy who reveals his true power when he sleeps, boards the Infinity Train on a new mission with the Fire Hashira, Kyōjurō Rengoku, to defeat a demon who has been tormenting the people and killing the demon slayers who oppose it!","popularity":975.462,"poster_path":"/h8Rb9gBr48ODIwYUttZNYeMWeUU.jpg","release_date":"2020-10-16","title":"Demon Slayer -Kimetsu no Yaiba- The Movie: Mugen Train","video":false,"vote_average":8.4,"vote_count":1917}] \ No newline at end of file diff --git a/src/files/persons/persons.json b/src/files/persons/persons.json new file mode 100644 index 0000000..0c657a9 --- /dev/null +++ b/src/files/persons/persons.json @@ -0,0 +1 @@ +[{"adult":false,"gender":1,"id":15555,"known_for":[{"adult":false,"backdrop_path":"/mfJepkInUbiZ0mFXFhDNz8ko6Zr.jpg","genre_ids":[18,9648,878],"id":1124,"media_type":"movie","original_language":"en","original_title":"The Prestige","overview":"A mysterious story of two magicians whose intense rivalry leads them on a life-long battle for supremacy -- full of obsession, deceit and jealousy with dangerous and deadly consequences.","poster_path":"/bdN3gXuIZYaJP7ftKK2sU0nPtEA.jpg","release_date":"2006-10-19","title":"The Prestige","video":false,"vote_average":8.2,"vote_count":12416},{"adult":false,"backdrop_path":"/4bAwGmE9Sl4FeXoHWVWLXkURHbe.jpg","genre_ids":[28,53,878],"id":59967,"media_type":"movie","original_language":"en","original_title":"Looper","overview":"In the futuristic action thriller Looper, time travel will be invented but it will be illegal and only available on the black market. When the mob wants to get rid of someone, they will send their target 30 years into the past where a looper, a hired gun, like Joe is waiting to mop up. Joe is getting rich and life is good until the day the mob decides to close the loop, sending back Joe's future self for assassination.","poster_path":"/sNjL6SqErDBE8OUZlrDLkexfsCj.jpg","release_date":"2012-09-26","title":"Looper","video":false,"vote_average":6.8,"vote_count":8592},{"backdrop_path":"/hiK4qc0tZijQ9KNUnBIS1k4tdMJ.jpg","first_air_date":"2004-11-16","genre_ids":[18,35,9648],"id":1408,"media_type":"tv","name":"House","origin_country":["US"],"original_language":"en","original_name":"House","overview":"Dr. Gregory House, a drug-addicted, unconventional, misanthropic medical genius, leads a team of diagnosticians at the fictional Princeton–Plainsboro Teaching Hospital in New Jersey.","poster_path":"/lkvhReTBZ2Ksl0Dl5Oplsf6UYkF.jpg","vote_average":8.6,"vote_count":4209}],"known_for_department":"Acting","name":"Piper Perabo","popularity":135.976,"profile_path":"/aP9QqLm4JZxLwp2CiUbEh5zrpVI.jpg"},{"adult":false,"gender":0,"id":1333809,"known_for":[{"adult":false,"backdrop_path":"/eZdjRtPKPd4XLWy5aUovh4QVL5u.jpg","genre_ids":[37,28],"id":11969,"media_type":"movie","original_language":"en","original_title":"Tombstone","overview":"Legendary marshal Wyatt Earp, now a weary gunfighter, joins his brothers Morgan and Virgil to pursue their collective fortune in the thriving mining town of Tombstone. But Earp is forced to don a badge again and get help from his notorious pal Doc Holliday when a gang of renegade brigands and rustlers begins terrorizing the town.","poster_path":"/wu1VoC8qPJ89jaZM394xt8G3s1Y.jpg","release_date":"1993-12-25","title":"Tombstone","video":false,"vote_average":7.6,"vote_count":1462},{"backdrop_path":"/5YTM1bh3Jyfy9IP2eS64W3JDeGs.jpg","first_air_date":"2018-06-20","genre_ids":[37,18],"id":73586,"media_type":"tv","name":"Yellowstone","origin_country":["US"],"original_language":"en","original_name":"Yellowstone","overview":"Follow the violent world of the Dutton family, who controls the largest contiguous ranch in the United States. Led by their patriarch John Dutton, the family defends their property against constant attack by land developers, an Indian reservation, and America’s first National Park.","poster_path":"/iqWCUwLcjkVgtpsDLs8xx8kscg6.jpg","vote_average":8,"vote_count":712},{"adult":false,"backdrop_path":"/xbxqoukQb2lRht4gozESZw4UFlG.jpg","genre_ids":[28,35],"id":398177,"media_type":"movie","original_language":"en","original_title":"Just Getting Started","overview":"Duke Diver is living the high life as the freewheeling manager of a luxurious resort in Palm Springs, Calif. He soon faces competition from Leo, a former military man who likes the same woman that Duke is interested in. When Diver's past suddenly catches up with him, he must put aside his differences and reluctantly team up with Leo to stop whoever is trying to kill him.","poster_path":"/70eVsU4nvVidEs7mpPcEcBlIpmx.jpg","release_date":"2017-12-01","title":"Just Getting Started","video":false,"vote_average":4.9,"vote_count":172}],"known_for_department":"Acting","name":"Forrie J. Smith","popularity":84.379,"profile_path":"/A3JvvFVzfF5M7Pvi2csISkoqxDC.jpg"},{"adult":false,"gender":2,"id":1136406,"known_for":[{"adult":false,"backdrop_path":"/lmZFxXgJE3vgrciwuDib0N8CfQo.jpg","genre_ids":[12,28,878],"id":299536,"media_type":"movie","original_language":"en","original_title":"Avengers: Infinity War","overview":"As the Avengers and their allies have continued to protect the world from threats too large for any one hero to handle, a new danger has emerged from the cosmic shadows: Thanos. A despot of intergalactic infamy, his goal is to collect all six Infinity Stones, artifacts of unimaginable power, and use them to inflict his twisted will on all of reality. Everything the Avengers have fought for has led up to this moment - the fate of Earth and existence itself has never been more uncertain.","poster_path":"/7WsyChQLEftFiDOVTGkv3hFpyyt.jpg","release_date":"2018-04-25","title":"Avengers: Infinity War","video":false,"vote_average":8.3,"vote_count":23289},{"adult":false,"backdrop_path":"/7RyHsO4yDXtBv1zUU3mTpHeQ0d5.jpg","genre_ids":[12,878,28],"id":299534,"media_type":"movie","original_language":"en","original_title":"Avengers: Endgame","overview":"After the devastating events of Avengers: Infinity War, the universe is in ruins due to the efforts of the Mad Titan, Thanos. With the help of remaining allies, the Avengers must assemble once more in order to undo Thanos' actions and restore order to the universe once and for all, no matter what consequences may be in store.","poster_path":"/or06FN3Dka5tukK1e9sl16pB3iy.jpg","release_date":"2019-04-24","title":"Avengers: Endgame","video":false,"vote_average":8.3,"vote_count":19724},{"adult":false,"backdrop_path":"/7FWlcZq3r6525LWOcvO9kNWurN1.jpg","genre_ids":[12,28,878],"id":271110,"media_type":"movie","original_language":"en","original_title":"Captain America: Civil War","overview":"Following the events of Age of Ultron, the collective governments of the world pass an act designed to regulate all superhuman activity. This polarizes opinion amongst the Avengers, causing two factions to side with Iron Man or Captain America, which causes an epic battle between former allies.","poster_path":"/rAGiXaUfPzY7CDEyNKUofk3Kw2e.jpg","release_date":"2016-04-27","title":"Captain America: Civil War","video":false,"vote_average":7.4,"vote_count":18976}],"known_for_department":"Acting","name":"Tom Holland","popularity":82.993,"profile_path":"/2qhIDp44cAqP2clOgt2afQI07X8.jpg"},{"adult":false,"gender":1,"id":67837,"known_for":[{"adult":false,"backdrop_path":"/u0jVmyqnMmvFuTWRaUuPdRrIZQP.jpg","genre_ids":[18,35,10749],"id":82693,"media_type":"movie","original_language":"en","original_title":"Silver Linings Playbook","overview":"After spending eight months in a mental institution, a former teacher moves back in with his parents and tries to reconcile with his ex-wife.","poster_path":"/y7iOVneBvITlBdhy6tVqXVOa1Js.jpg","release_date":"2012-09-08","title":"Silver Linings Playbook","video":false,"vote_average":7.1,"vote_count":10151},{"adult":false,"backdrop_path":"/pDKFL1zcHzEpmz4MJA5JJnRbJeD.jpg","genre_ids":[53,18,878],"id":405774,"media_type":"movie","original_language":"en","original_title":"Bird Box","overview":"Five years after an ominous unseen presence drives most of society to suicide, a survivor and her two children make a desperate bid to reach safety.","poster_path":"/rGfGfgL2pEPCfhIvqHXieXFn7gp.jpg","release_date":"2018-12-13","title":"Bird Box","video":false,"vote_average":6.9,"vote_count":7993},{"adult":false,"backdrop_path":"/bAI7aPHQcvSZXvt7L11kMJdS0Gm.jpg","genre_ids":[35,18],"id":371638,"media_type":"movie","original_language":"en","original_title":"The Disaster Artist","overview":"An aspiring actor in Hollywood meets an enigmatic stranger by the name of Tommy Wiseau, the meeting leads the actor down a path nobody could have predicted; creating the worst movie ever made.","poster_path":"/jj84nF5vYRD0HUTowBKcrKk8hZP.jpg","release_date":"2017-03-12","title":"The Disaster Artist","video":false,"vote_average":7.1,"vote_count":2931}],"known_for_department":"Acting","name":"Jacki Weaver","popularity":75.827,"profile_path":"/1bc9fUnbFQdDeXKho22eyXrNR63.jpg"},{"adult":false,"gender":2,"id":12852,"known_for":[{"adult":false,"backdrop_path":"/fCCvn3xsG29TGKJPvZgTRppsDgk.jpg","genre_ids":[80,18,53],"id":6977,"media_type":"movie","original_language":"en","original_title":"No Country for Old Men","overview":"Llewelyn Moss stumbles upon dead bodies, $2 million and a hoard of heroin in a Texas desert, but methodical killer Anton Chigurh comes looking for it, with local sheriff Ed Tom Bell hot on his trail. The roles of prey and predator blur as the violent pursuit of money and justice collide.","poster_path":"/6d5XOczc226jECq0LIX0siKtgHR.jpg","release_date":"2007-11-08","title":"No Country for Old Men","video":false,"vote_average":7.9,"vote_count":9189},{"backdrop_path":"/hPea3Qy5Gd6z4kJLUruBbwAH8Rm.jpg","first_air_date":"2015-02-08","genre_ids":[35,80,18],"id":60059,"media_type":"tv","name":"Better Call Saul","origin_country":["US"],"original_language":"en","original_name":"Better Call Saul","overview":"Six years before Saul Goodman meets Walter White. We meet him when the man who will become Saul Goodman is known as Jimmy McGill, a small-time lawyer searching for his destiny, and, more immediately, hustling to make ends meet. Working alongside, and, often, against Jimmy, is “fixer” Mike Ehrmantraut. The series tracks Jimmy’s transformation into Saul Goodman, the man who puts “criminal” in “criminal lawyer\".","poster_path":"/cU0kAjGjA6d2XjBzJMUIEVKiGDb.jpg","vote_average":8.4,"vote_count":2432},{"backdrop_path":"/x4lxFIhhrDI4nWtV8osnYwbGESV.jpg","first_air_date":"2009-09-23","genre_ids":[35],"id":1421,"media_type":"tv","name":"Modern Family","origin_country":["US"],"original_language":"en","original_name":"Modern Family","overview":"The Pritchett-Dunphy-Tucker clan is a wonderfully large and blended family. They give us an honest and often hilarious look into the sometimes warm, sometimes twisted, embrace of the modern family.","poster_path":"/fu5vEUHgxkAPmX26ISQXqHmlPMq.jpg","vote_average":7.7,"vote_count":1573}],"known_for_department":"Acting","name":"Barry Corbin","popularity":75.606,"profile_path":"/avNg0rmudSPg30f8Xt9BwkPDC17.jpg"},{"adult":false,"gender":1,"id":1230687,"known_for":[{"backdrop_path":"/hiK4qc0tZijQ9KNUnBIS1k4tdMJ.jpg","first_air_date":"2004-11-16","genre_ids":[18,35,9648],"id":1408,"media_type":"tv","name":"House","origin_country":["US"],"original_language":"en","original_name":"House","overview":"Dr. Gregory House, a drug-addicted, unconventional, misanthropic medical genius, leads a team of diagnosticians at the fictional Princeton–Plainsboro Teaching Hospital in New Jersey.","poster_path":"/lkvhReTBZ2Ksl0Dl5Oplsf6UYkF.jpg","vote_average":8.6,"vote_count":4209},{"backdrop_path":"/vxrpEBnnwUPDDJ0cSKi0Pi9zdlS.jpg","first_air_date":"2013-01-11","genre_ids":[80,18],"id":41727,"media_type":"tv","name":"Banshee","origin_country":["US"],"original_language":"en","original_name":"Banshee","overview":"Banshee is an American drama television series set in a small town in Pennsylvania Amish country and features an enigmatic ex-con posing as a murdered sheriff who imposes his own brand of justice while also cooking up plans that serve his own interests.","poster_path":"/5nXFiz8Rn8eezVjSTZBd7HmnF1G.jpg","vote_average":7.9,"vote_count":759},{"backdrop_path":"/6slPhy6cI8SxH9VgqyAErldJGxx.jpg","first_air_date":"2015-11-17","genre_ids":[18],"id":62650,"media_type":"tv","name":"Chicago Med","origin_country":["US"],"original_language":"en","original_name":"Chicago Med","overview":"An emotional thrill ride through the day-to-day chaos of the city's most explosive hospital and the courageous team of doctors who hold it together. They will tackle unique new cases inspired by topical events, forging fiery relationships in the pulse-pounding pandemonium of the emergency room.","poster_path":"/dzRU492K7yWwiEqVnjm4CurJmn2.jpg","vote_average":8.4,"vote_count":760}],"known_for_department":"Acting","name":"Jennifer Landon","popularity":58.381,"profile_path":"/o1XDkIoyZTwjSXF9SE7mTZb8Xeb.jpg"},{"adult":false,"gender":2,"id":1215399,"known_for":[{"adult":false,"backdrop_path":"/4NdAMnBwSAaSsUjoXkcU5aW28RF.jpg","genre_ids":[28,80,53],"id":273481,"media_type":"movie","original_language":"en","original_title":"Sicario","overview":"An idealistic FBI agent is enlisted by a government task force to aid in the escalating war against drugs at the border area between the U.S. and Mexico.","poster_path":"/tw0lXhbNkklvseuJ4aYldkVyXV7.jpg","release_date":"2015-09-17","title":"Sicario","video":false,"vote_average":7.4,"vote_count":6564},{"adult":false,"backdrop_path":"/kQGxGXzYiCumY8kmXXpgbZyZQK8.jpg","genre_ids":[80,18,9648,53],"id":395834,"media_type":"movie","original_language":"en","original_title":"Wind River","overview":"An FBI agent teams with the town's veteran game tracker to investigate a murder that occurred on a Native American reservation.","poster_path":"/pySivdR845Hom4u4T2WNkJxe6Ad.jpg","release_date":"2017-08-03","title":"Wind River","video":false,"vote_average":7.4,"vote_count":3848},{"adult":false,"backdrop_path":"/GZx3RAiTJAhXOdhLLyCAbqRl11.jpg","genre_ids":[37,80],"id":338766,"media_type":"movie","original_language":"en","original_title":"Hell or High Water","overview":"A divorced dad and his ex-con brother resort to a desperate scheme in order to save their family's farm in West Texas.","poster_path":"/ljRRxqy2aXIkIBXLmOVifcOR021.jpg","release_date":"2016-08-12","title":"Hell or High Water","video":false,"vote_average":7.3,"vote_count":3542}],"known_for_department":"Writing","name":"Taylor Sheridan","popularity":57.089,"profile_path":"/vdGTrPJG95AhBXr3xId5Fj8cTCu.jpg"},{"adult":false,"gender":1,"id":56734,"known_for":[{"adult":false,"backdrop_path":"/P4bGyJQF0shAcRku3I2perNUQR.jpg","genre_ids":[28,80],"id":23483,"media_type":"movie","original_language":"en","original_title":"Kick-Ass","overview":"Dave Lizewski is an unnoticed high school student and comic book fan who one day decides to become a super-hero, even though he has no powers, training or meaningful reason to do so.","poster_path":"/8citjdBmjddZjlPsAHEyCKwGVvD.jpg","release_date":"2010-03-22","title":"Kick-Ass","video":false,"vote_average":7.1,"vote_count":9764},{"adult":false,"backdrop_path":"/etBZfuOie3uODTKTV5xnbAKB4Fr.jpg","genre_ids":[35,18,10749],"id":19913,"media_type":"movie","original_language":"en","original_title":"(500) Days of Summer","overview":"Tom, greeting-card writer and hopeless romantic, is caught completely off-guard when his girlfriend, Summer, suddenly dumps him. He reflects on their 500 days together to try to figure out where their love affair went sour, and in doing so, Tom rediscovers his true passions in life.","poster_path":"/f9mbM0YMLpYemcWx6o2WeiYQLDP.jpg","release_date":"2009-07-17","title":"(500) Days of Summer","video":false,"vote_average":7.3,"vote_count":8008},{"adult":false,"backdrop_path":"/wNAfVj1ObGNye5fQM4tJXJGtU0.jpg","genre_ids":[53,28,80],"id":156022,"media_type":"movie","original_language":"en","original_title":"The Equalizer","overview":"McCall believes he has put his mysterious past behind him and dedicated himself to beginning a new, quiet life. But when he meets Teri, a young girl under the control of ultra-violent Russian gangsters, he can’t stand idly by – he has to help her. Armed with hidden skills that allow him to serve vengeance against anyone who would brutalize the helpless, McCall comes out of his self-imposed retirement and finds his desire for justice reawakened. If someone has a problem, if the odds are stacked against them, if they have nowhere else to turn, McCall will help. He is The Equalizer.","poster_path":"/9u4yW7yPA0BQ2pv9XwiNzItwvp8.jpg","release_date":"2014-09-24","title":"The Equalizer","video":false,"vote_average":7.2,"vote_count":6933}],"known_for_department":"Acting","name":"Chloë Grace Moretz","popularity":51.656,"profile_path":"/yq4rYmaTRC5degaOYmJQFpaiho1.jpg"},{"adult":false,"gender":1,"id":1042728,"known_for":[{"backdrop_path":"/gFZriCkpJYsApPZEF3jhxL4yLzG.jpg","first_air_date":"2017-05-02","genre_ids":[80,18],"id":71446,"media_type":"tv","name":"Money Heist","origin_country":["ES"],"original_language":"es","original_name":"La Casa de Papel","overview":"To carry out the biggest heist in history, a mysterious man called The Professor recruits a band of eight robbers who have a single characteristic: none of them has anything to lose. Five months of seclusion - memorizing every step, every detail, every probability - culminate in eleven days locked up in the National Coinage and Stamp Factory of Spain, surrounded by police forces and with dozens of hostages in their power, to find out whether their suicide wager will lead to everything or nothing.","poster_path":"/reEMJA1uzscCbkpeRJeTT2bjqUp.jpg","vote_average":8.3,"vote_count":15507},{"adult":false,"backdrop_path":"/yEBBtk1eyZltGgJt8Z2zi3KIvvX.jpg","genre_ids":[99],"id":689249,"media_type":"movie","original_language":"es","original_title":"La Casa de Papel: el fenómeno","overview":"A documentary on why 'Money Heist' sparked a wave of enthusiasm around the world for a lovable group of thieves and their professor.","poster_path":"/AboUXTrDWEi0PuZUqaft0iwBTm7.jpg","release_date":"2020-04-03","title":"Money Heist: The Phenomenon","video":false,"vote_average":7.5,"vote_count":912},{"adult":false,"backdrop_path":"/2OFg5p9yarI5zZsUWKCRgBgPctj.jpg","genre_ids":[28,12],"id":568620,"media_type":"movie","original_language":"en","original_title":"Snake Eyes: G.I. Joe Origins","overview":"After saving the life of their heir apparent, tenacious loner Snake Eyes is welcomed into an ancient Japanese clan called the Arashikage where he is taught the ways of the ninja warrior. But, when secrets from his past are revealed, Snake Eyes' honor and allegiance will be tested – even if that means losing the trust of those closest to him.","poster_path":"/uIXF0sQGXOxQhbaEaKOi2VYlIL0.jpg","release_date":"2021-07-22","title":"Snake Eyes: G.I. Joe Origins","video":false,"vote_average":6.8,"vote_count":872}],"known_for_department":"Acting","name":"Úrsula Corberó","popularity":50.8,"profile_path":"/noNEe22FM78cYuNGH9jwdQ6rdA8.jpg"},{"adult":false,"gender":2,"id":3041823,"known_for":[{"backdrop_path":"/3LhamTOykvDT64mJSbwjvNqT84T.jpg","first_air_date":"2020-03-06","genre_ids":[16],"id":100210,"media_type":"tv","name":"Onii-chan Asa made Zutto Gyutte Shite!","origin_country":["JP"],"original_language":"ja","original_name":"お兄ちゃん, 朝までずっとギュッてして!","overview":"Growing up I was a sickly child and due to this my parents designed an experiment to attempt to help me improve my immunity by hugging my sisters for extended periods each day.\n\nEventually this ended up growing into more than hugging as the closeness to my sisters stirred up feelings from within that I just couldn't ignore.","poster_path":"/fikdxPqIBSVXN5GWaUjXOxjQyl6.jpg","vote_average":0,"vote_count":0}],"known_for_department":"Acting","name":"Yotsuba Yō","popularity":50.036,"profile_path":null},{"adult":false,"gender":1,"id":1245,"known_for":[{"adult":false,"backdrop_path":"/nNmJRkg8wWnRmzQDe2FwKbPIsJV.jpg","genre_ids":[878,28,12],"id":24428,"media_type":"movie","original_language":"en","original_title":"The Avengers","overview":"When an unexpected enemy emerges and threatens global safety and security, Nick Fury, director of the international peacekeeping agency known as S.H.I.E.L.D., finds himself in need of a team to pull the world back from the brink of disaster. Spanning the globe, a daring recruitment effort begins!","poster_path":"/RYMX2wcKCBAr24UyPD7xwmjaTn.jpg","release_date":"2012-04-25","title":"The Avengers","video":false,"vote_average":7.7,"vote_count":25867},{"adult":false,"backdrop_path":"/lmZFxXgJE3vgrciwuDib0N8CfQo.jpg","genre_ids":[12,28,878],"id":299536,"media_type":"movie","original_language":"en","original_title":"Avengers: Infinity War","overview":"As the Avengers and their allies have continued to protect the world from threats too large for any one hero to handle, a new danger has emerged from the cosmic shadows: Thanos. A despot of intergalactic infamy, his goal is to collect all six Infinity Stones, artifacts of unimaginable power, and use them to inflict his twisted will on all of reality. Everything the Avengers have fought for has led up to this moment - the fate of Earth and existence itself has never been more uncertain.","poster_path":"/7WsyChQLEftFiDOVTGkv3hFpyyt.jpg","release_date":"2018-04-25","title":"Avengers: Infinity War","video":false,"vote_average":8.3,"vote_count":23289},{"adult":false,"backdrop_path":"/7RyHsO4yDXtBv1zUU3mTpHeQ0d5.jpg","genre_ids":[12,878,28],"id":299534,"media_type":"movie","original_language":"en","original_title":"Avengers: Endgame","overview":"After the devastating events of Avengers: Infinity War, the universe is in ruins due to the efforts of the Mad Titan, Thanos. With the help of remaining allies, the Avengers must assemble once more in order to undo Thanos' actions and restore order to the universe once and for all, no matter what consequences may be in store.","poster_path":"/or06FN3Dka5tukK1e9sl16pB3iy.jpg","release_date":"2019-04-24","title":"Avengers: Endgame","video":false,"vote_average":8.3,"vote_count":19724}],"known_for_department":"Acting","name":"Scarlett Johansson","popularity":49.825,"profile_path":"/6NsMbJXRlDZuDzatN2akFdGuTvx.jpg"},{"adult":false,"gender":1,"id":17521,"known_for":[{"adult":false,"backdrop_path":"/oLmifRdaETboot2PXxpZN8NqHhK.jpg","genre_ids":[28,12,80,9648],"id":10528,"media_type":"movie","original_language":"en","original_title":"Sherlock Holmes","overview":"Eccentric consulting detective, Sherlock Holmes and Doctor John Watson battle to bring down a new nemesis and unravel a deadly plot that could destroy England.","poster_path":"/momkKuWburNTqKBF6ez7rvhYVhE.jpg","release_date":"2009-01-01","title":"Sherlock Holmes","video":false,"vote_average":7.2,"vote_count":11815},{"adult":false,"backdrop_path":"/nVMalJRUsOeGP5xPx9ULmirZ4cJ.jpg","genre_ids":[12,28,80,9648],"id":58574,"media_type":"movie","original_language":"en","original_title":"Sherlock Holmes: A Game of Shadows","overview":"There is a new criminal mastermind at large (Professor Moriarty) and not only is he Holmes’ intellectual equal, but his capacity for evil and lack of conscience may give him an advantage over the detective.","poster_path":"/y1MYZkwhZK6L0Jy4YMuPktzDOfn.jpg","release_date":"2011-11-22","title":"Sherlock Holmes: A Game of Shadows","video":false,"vote_average":7.1,"vote_count":8642},{"adult":false,"backdrop_path":"/yBq4jWZLaEJIssuVx2fAysEwJnt.jpg","genre_ids":[18,10749],"id":4348,"media_type":"movie","original_language":"en","original_title":"Pride & Prejudice","overview":"A story of love and life among the landed English gentry during the Georgian era. Mr. Bennet is a gentleman living in Hertfordshire with his overbearing wife and five daughters, but if he dies their house will be inherited by a distant cousin whom they have never met, so the family's future happiness and security is dependent on the daughters making good marriages.","poster_path":"/sGjIvtVvTlWnia2zfJfHz81pZ9Q.jpg","release_date":"2005-09-16","title":"Pride & Prejudice","video":false,"vote_average":8.1,"vote_count":6152}],"known_for_department":"Acting","name":"Kelly Reilly","popularity":49.483,"profile_path":"/l8aQsryOQvxgX6SdZ4XtzU8KEXn.jpg"},{"adult":false,"gender":2,"id":10859,"known_for":[{"adult":false,"backdrop_path":"/n28I7FNYIT934OoHhKZn4IIDsrQ.jpg","genre_ids":[28,12,35],"id":293660,"media_type":"movie","original_language":"en","original_title":"Deadpool","overview":"Deadpool tells the origin story of former Special Forces operative turned mercenary Wade Wilson, who after being subjected to a rogue experiment that leaves him with accelerated healing powers, adopts the alter ego Deadpool. Armed with his new abilities and a dark, twisted sense of humor, Deadpool hunts down the man who nearly destroyed his life.","poster_path":"/fSRb7vyIP8rQpL0I47P3qUsEKX3.jpg","release_date":"2016-02-09","title":"Deadpool","video":false,"vote_average":7.6,"vote_count":25900},{"adult":false,"backdrop_path":"/3P52oz9HPQWxcwHOwxtyrVV1LKi.jpg","genre_ids":[28,35,12],"id":383498,"media_type":"movie","original_language":"en","original_title":"Deadpool 2","overview":"Wisecracking mercenary Deadpool battles the evil and powerful Cable and other bad guys to save a boy's life.","poster_path":"/to0spRl1CMDvyUbOnbb4fTk3VAd.jpg","release_date":"2018-05-10","title":"Deadpool 2","video":false,"vote_average":7.5,"vote_count":14020},{"adult":false,"backdrop_path":"/y4Nyby674jtsbYLzVx1lSgaz1WB.jpg","genre_ids":[35,14],"id":72105,"media_type":"movie","original_language":"en","original_title":"Ted","overview":"John Bennett, a man whose childhood wish of bringing his teddy bear to life came true, now must decide between keeping the relationship with the bear or his girlfriend, Lori.","poster_path":"/osJNr64CNyGhCzdlg6oHt3a6vNA.jpg","release_date":"2012-06-29","title":"Ted","video":false,"vote_average":6.4,"vote_count":10209}],"known_for_department":"Acting","name":"Ryan Reynolds","popularity":48.149,"profile_path":"/4SYTH5FdB0dAORV98Nwg3llgVnY.jpg"},{"adult":false,"gender":1,"id":130640,"known_for":[{"adult":false,"backdrop_path":"/6qVF0gnLnbKCgcMfCpCB8GH7B5I.jpg","genre_ids":[28,12,16,878,35],"id":324857,"media_type":"movie","original_language":"en","original_title":"Spider-Man: Into the Spider-Verse","overview":"Miles Morales is juggling his life between being a high school student and being a spider-man. When Wilson \"Kingpin\" Fisk uses a super collider, others from across the Spider-Verse are transported to this dimension.","poster_path":"/iiZZdoQBEYBv6id8su7ImL0oCbD.jpg","release_date":"2018-12-06","title":"Spider-Man: Into the Spider-Verse","video":false,"vote_average":8.4,"vote_count":10318},{"adult":false,"backdrop_path":"/qGqlWb5izTPtFngBWdbJAEmninR.jpg","genre_ids":[878,28,12],"id":80274,"media_type":"movie","original_language":"en","original_title":"Ender's Game","overview":"Based on the classic novel by Orson Scott Card, Ender's Game is the story of the Earth's most gifted children training to defend their homeplanet in the space wars of the future.","poster_path":"/tBgkQqrO2RMgGQR6zod3bSjcPWx.jpg","release_date":"2013-10-24","title":"Ender's Game","video":false,"vote_average":6.6,"vote_count":4755},{"adult":false,"backdrop_path":"/hMANgfPHR1tRObNp2oPiOi9mMlz.jpg","genre_ids":[28,12,878],"id":424783,"media_type":"movie","original_language":"en","original_title":"Bumblebee","overview":"On the run in the year 1987, Bumblebee finds refuge in a junkyard in a small Californian beach town. Charlie, on the cusp of turning 18 and trying to find her place in the world, discovers Bumblebee, battle-scarred and broken. When Charlie revives him, she quickly learns this is no ordinary yellow VW bug.","poster_path":"/fw02ONlDhrYjTSZV8XO6hhU3ds3.jpg","release_date":"2018-12-15","title":"Bumblebee","video":false,"vote_average":6.7,"vote_count":4703}],"known_for_department":"Acting","name":"Hailee Steinfeld","popularity":45.601,"profile_path":"/dxSDWkiVaC6JYjrV3XRAZI7HOSS.jpg"},{"adult":false,"gender":1,"id":109513,"known_for":[{"adult":false,"backdrop_path":"/mMoG4nPSDupXIXOwVvpexZY2W0N.jpg","genre_ids":[28,18,53],"id":254128,"media_type":"movie","original_language":"en","original_title":"San Andreas","overview":"In the aftermath of a massive earthquake in California, a rescue-chopper pilot makes a dangerous journey across the state in order to rescue his estranged daughter.","poster_path":"/2Gfjn962aaFSD6eST6QU3oLDZTo.jpg","release_date":"2015-05-27","title":"San Andreas","video":false,"vote_average":6.2,"vote_count":6910},{"adult":false,"backdrop_path":"/6QmX2BDVr1hIOIPHqnxvp1C1ZZp.jpg","genre_ids":[35,28,80],"id":339846,"media_type":"movie","original_language":"en","original_title":"Baywatch","overview":"Devoted lifeguard Mitch Buchannon butts heads with a brash new recruit. Together, they uncover a local criminal plot that threatens the future of the Bay.","poster_path":"/6HE4xd8zloDqmjMZuhUCCw2UcY1.jpg","release_date":"2017-05-12","title":"Baywatch","video":false,"vote_average":6.1,"vote_count":6701},{"adult":false,"backdrop_path":"/sEyNWq9985lyUrwayWnvicT4FHA.jpg","genre_ids":[12,14,10751],"id":32657,"media_type":"movie","original_language":"en","original_title":"Percy Jackson & the Olympians: The Lightning Thief","overview":"Accident prone teenager, Percy discovers he's actually a demi-God, the son of Poseidon, and he is needed when Zeus' lightning is stolen. Percy must master his new found skills in order to prevent a war between the Gods that could devastate the entire world.","poster_path":"/nmyrUTjmvZ3OQYZJrUKAoiBfMq5.jpg","release_date":"2010-02-01","title":"Percy Jackson & the Olympians: The Lightning Thief","video":false,"vote_average":6.2,"vote_count":6066}],"known_for_department":"Acting","name":"Alexandra Daddario","popularity":45.524,"profile_path":"/netqGkeTEPtyMBdpMWophvK3y7N.jpg"},{"adult":false,"gender":1,"id":55615,"known_for":[{"adult":false,"backdrop_path":"/pUKIUdLMHvPkCs5pQeB2TFhPSYM.jpg","genre_ids":[18,53],"id":264644,"media_type":"movie","original_language":"en","original_title":"Room","overview":"Held captive for 7 years in an enclosed space, a woman and her young son finally gain their freedom, allowing the boy to experience the outside world for the first time.","poster_path":"/pCURNjeomWbMSdiP64gj8NVVHTQ.jpg","release_date":"2015-10-16","title":"Room","video":false,"vote_average":8.1,"vote_count":7644},{"adult":false,"backdrop_path":"/12gfRwL8RuZUQ4kiGzq9kRYBK5J.jpg","genre_ids":[28,35,9648,80],"id":302699,"media_type":"movie","original_language":"en","original_title":"Central Intelligence","overview":"After he reunites with an old pal through Facebook, a mild-mannered accountant is lured into the world of international espionage.","poster_path":"/7Ou0TRJLi72AwLEUlo7Kym4XuNB.jpg","release_date":"2016-06-15","title":"Central Intelligence","video":false,"vote_average":6.4,"vote_count":4634},{"adult":false,"backdrop_path":"/geIRfrdswvrkOpY6un82FVwMitM.jpg","genre_ids":[18,35,10749],"id":212716,"media_type":"movie","original_language":"en","original_title":"What If","overview":"Wallace, who is burned out from a string of failed relationships, forms an instant bond with Chantry, who lives with her longtime boyfriend. Together, they puzzle out what it means if your best friend is also the love of your life.","poster_path":"/67x9NJyjK4u02NpISnChDMKzCUr.jpg","release_date":"2013-09-07","title":"What If","video":false,"vote_average":6.7,"vote_count":1641}],"known_for_department":"Acting","name":"Megan Park","popularity":43.796,"profile_path":"/gKRr9DaU91WMh9BAAM3HgkauJhf.jpg"},{"adult":false,"gender":1,"id":205976,"known_for":[{"adult":false,"backdrop_path":"/sLWUtbrpiLp23a0XDSiUiltdFPJ.jpg","genre_ids":[28,12,14],"id":1930,"media_type":"movie","original_language":"en","original_title":"The Amazing Spider-Man","overview":"Peter Parker is an outcast high schooler abandoned by his parents as a boy, leaving him to be raised by his Uncle Ben and Aunt May. Like most teenagers, Peter is trying to figure out who he is and how he got to be the person he is today. As Peter discovers a mysterious briefcase that belonged to his father, he begins a quest to understand his parents' disappearance – leading him directly to Oscorp and the lab of Dr. Curt Connors, his father's former partner. As Spider-Man is set on a collision course with Connors' alter ego, The Lizard, Peter will make life-altering choices to use his powers and shape his destiny to become a hero.","poster_path":"/fSbqPbqXa7ePo8bcnZYN9AHv6zA.jpg","release_date":"2012-06-23","title":"The Amazing Spider-Man","video":false,"vote_average":6.6,"vote_count":13744},{"adult":false,"backdrop_path":"/kQGxGXzYiCumY8kmXXpgbZyZQK8.jpg","genre_ids":[80,18,9648,53],"id":395834,"media_type":"movie","original_language":"en","original_title":"Wind River","overview":"An FBI agent teams with the town's veteran game tracker to investigate a murder that occurred on a Native American reservation.","poster_path":"/pySivdR845Hom4u4T2WNkJxe6Ad.jpg","release_date":"2017-08-03","title":"Wind River","video":false,"vote_average":7.4,"vote_count":3852},{"backdrop_path":"/gZzIQxo2ukFSdZGtlttA0wI6kax.jpg","first_air_date":"2011-06-05","genre_ids":[10765,18],"id":34524,"media_type":"tv","name":"Teen Wolf","origin_country":["US"],"original_language":"en","original_name":"Teen Wolf","overview":"Scott McCall, a high school student living in the town of Beacon Hills has his life drastically changed when he's bitten by a werewolf, becoming one himself. He must henceforth learn to balance his problematic new identity with his day-to-day teenage life. The following characters are instrumental to his struggle: Stiles, his best friend; Allison, his love interest who comes from a family of werewolf hunters; and Derek, a mysterious werewolf with a dark past. Throughout the series, he strives to keep his loved ones safe while maintaining normal relationships with them.","poster_path":"/vY2vfAskJTiWsQSv6bdbNCQhPLm.jpg","vote_average":8.6,"vote_count":2915}],"known_for_department":"Acting","name":"Kelsey Asbille","popularity":43.414,"profile_path":"/8mXqxKaPc6FpAnLeZlPaaUaJHdC.jpg"},{"adult":false,"gender":2,"id":2524,"known_for":[{"adult":false,"backdrop_path":"/s3TBrRGB1iav7gFOCNx3H31MoES.jpg","genre_ids":[28,878,12],"id":27205,"media_type":"movie","original_language":"en","original_title":"Inception","overview":"Cobb, a skilled thief who commits corporate espionage by infiltrating the subconscious of his targets is offered a chance to regain his old life as payment for a task considered to be impossible: \"inception\", the implantation of another person's idea into a target's subconscious.","poster_path":"/9gk7adHYeDvHkCSEqAvQNLV5Uge.jpg","release_date":"2010-07-15","title":"Inception","video":false,"vote_average":8.3,"vote_count":30414},{"adult":false,"backdrop_path":"/nlCHUWjY9XWbuEUQauCBgnY8ymF.jpg","genre_ids":[28,12,878],"id":76341,"media_type":"movie","original_language":"en","original_title":"Mad Max: Fury Road","overview":"An apocalyptic story set in the furthest reaches of our planet, in a stark desert landscape where humanity is broken, and most everyone is crazed fighting for the necessities of life. Within this world exist two rebels on the run who just might be able to restore order.","poster_path":"/8tZYtuWezp8JbcsvHYO0O46tFbo.jpg","release_date":"2015-05-13","title":"Mad Max: Fury Road","video":false,"vote_average":7.5,"vote_count":18731},{"adult":false,"backdrop_path":"/cKPfiu9IcCW0fMdKdQBXe3PRtTZ.jpg","genre_ids":[28,80,18,53],"id":49026,"media_type":"movie","original_language":"en","original_title":"The Dark Knight Rises","overview":"Following the death of District Attorney Harvey Dent, Batman assumes responsibility for Dent's crimes to protect the late attorney's reputation and is subsequently hunted by the Gotham City Police Department. Eight years later, Batman encounters the mysterious Selina Kyle and the villainous Bane, a new terrorist leader who overwhelms Gotham's finest. The Dark Knight resurfaces to protect a city that has branded him an enemy.","poster_path":"/85cWkCVftiVs0BVey6pxX8uNmLt.jpg","release_date":"2012-07-16","title":"The Dark Knight Rises","video":false,"vote_average":7.8,"vote_count":18676}],"known_for_department":"Acting","name":"Tom Hardy","popularity":43.306,"profile_path":"/9bXUMLOBCcnhcUGtfw0pdqbvpiH.jpg"},{"adult":false,"gender":2,"id":6614,"known_for":[{"adult":false,"backdrop_path":"/bpV8wn48s82au37QyUJ51S7X2Vf.jpg","genre_ids":[18],"id":489,"media_type":"movie","original_language":"en","original_title":"Good Will Hunting","overview":"Will Hunting has a genius-level IQ but chooses to work as a janitor at MIT. When he solves a difficult graduate-level math problem, his talents are discovered by Professor Gerald Lambeau, who decides to help the misguided youth reach his potential. When Will is arrested for attacking a police officer, Professor Lambeau makes a deal to get leniency for him if he will get treatment from therapist Sean Maguire.","poster_path":"/bABCBKYBK7A5G1x0FzoeoNfuj2.jpg","release_date":"1997-12-05","title":"Good Will Hunting","video":false,"vote_average":8.1,"vote_count":9140},{"adult":false,"backdrop_path":"/z3ioibdjWZOYeXjoiabFOFOfPI3.jpg","genre_ids":[28,80,53],"id":584,"media_type":"movie","original_language":"en","original_title":"2 Fast 2 Furious","overview":"It's a major double-cross when former police officer Brian O'Conner teams up with his ex-con buddy Roman Pearce to transport a shipment of \"dirty\" money for shady Miami-based import-export dealer Carter Verone. But the guys are actually working with undercover agent Monica Fuentes to bring Verone down.","poster_path":"/qC167IbZpSrwX7wWgg3BeDQbTDr.jpg","release_date":"2003-06-05","title":"2 Fast 2 Furious","video":false,"vote_average":6.4,"vote_count":5665},{"adult":false,"backdrop_path":"/2ZusF7y230mM1NRlg9Ktgrak9Dg.jpg","genre_ids":[28,53],"id":117263,"media_type":"movie","original_language":"en","original_title":"Olympus Has Fallen","overview":"When the White House (Secret Service Code: \"Olympus\") is captured by a terrorist mastermind and the President is kidnapped, disgraced former Presidential guard Mike Banning finds himself trapped within the building. As the national security team scrambles to respond, they are forced to rely on Banning's inside knowledge to help retake the White House, save the President and avert an even bigger disaster.","poster_path":"/gKnx04MxnKcf5uOdhHhAAkqcCg.jpg","release_date":"2013-03-20","title":"Olympus Has Fallen","video":false,"vote_average":6.4,"vote_count":5497}],"known_for_department":"Acting","name":"Cole Hauser","popularity":42.081,"profile_path":"/kJyUtNZREd7mes21OrWiCtOugPL.jpg"},{"adult":false,"gender":1,"id":1109111,"known_for":[{"adult":false,"backdrop_path":"/ltt9yiCGmCQZunmxtkhtPxzmDzx.jpg","genre_ids":[12,35,10751],"id":499701,"media_type":"movie","original_language":"en","original_title":"Dora and the Lost City of Gold","overview":"Dora, a girl who has spent most of her life exploring the jungle with her parents, now must navigate her most dangerous adventure yet: high school. Always the explorer, Dora quickly finds herself leading Boots (her best friend, a monkey), Diego, and a rag tag group of teens on an adventure to save her parents and solve the impossible mystery behind a lost Inca civilization.","poster_path":"/xvYCZ740XvngXK0FNeSNVTJJJ5v.jpg","release_date":"2019-08-08","title":"Dora and the Lost City of Gold","video":false,"vote_average":6.8,"vote_count":1321},{"backdrop_path":"/1P3QtW1IkivqDrKbbwuR0zCYIf8.jpg","first_air_date":"2021-11-18","genre_ids":[10765,18,10759],"id":71914,"media_type":"tv","name":"The Wheel of Time","origin_country":["US"],"original_language":"en","original_name":"The Wheel of Time","overview":"Follow Moiraine, a member of the shadowy and influential all-female organization called the “Aes Sedai” as she embarks on a dangerous, world-spanning journey with five young men and women. Moiraine believes one of them might be the reincarnation of an incredibly powerful individual, whom prophecies say will either save humanity or destroy it.","poster_path":"/mpgDeLhl8HbhI03XLB7iKO6M6JE.jpg","vote_average":8.1,"vote_count":525},{"backdrop_path":"/yhi2ztBIEcXVvApTSsLQojI6it9.jpg","first_air_date":"2018-12-14","genre_ids":[10765],"id":83381,"media_type":"tv","name":"Tidelands","origin_country":["AU"],"original_language":"en","original_name":"Tidelands","overview":"Ex-con Cal McTeer's return to her hometown of Orphelin Bay blows the lid off a generations-long conspiracy of silence around murder, drugs and Sirens.","poster_path":"/tGVQa6Fym1wGkoM5o6LYFTlk6jx.jpg","vote_average":6.9,"vote_count":50}],"known_for_department":"Acting","name":"Madeleine Madden","popularity":42.066,"profile_path":"/oOZ1EJeq2DHxNNLAkLEyYYOlqlM.jpg"}] \ No newline at end of file diff --git a/src/moviedb.js b/src/moviedb.js index dd5591a..158ce86 100755 --- a/src/moviedb.js +++ b/src/moviedb.js @@ -1,38 +1,67 @@ #!/usr/bin/env node const { Command } = require("commander"); +const myParseInt = require("./utils/parseInt.js"); +const getPersons = require("./utils/getPersonsSpinner.js"); +const getPerson = require("./utils/getPersonSpinner.js"); +const getMovies = require("./utils/getMoviesSpinner.js"); +const getMovie = require("./utils/getMovieSpinner.js"); const program = new Command(); program.version("0.0.1"); +// Commands + program .command("get-persons") .description("Make a network request to fetch most popular persons") - .action(function handleAction() { - console.log("hello-world"); + .requiredOption("-p, --popular", "Fetch the popular persons") + .requiredOption( + "--page ", + "The page of persons data results to fetch", + myParseInt + ) + .option("-s --save", "Save the fetched data into a JSON file") + .option("-l --local", "Read the data from your local JSON file") + .action((options) => { + if (options.page) getPersons(options.page, options.save, options.local); }); program .command("get-person") .description("Make a network request to fetch the data of a single person") - .action(function handleAction() { - console.log("hello-world"); + .requiredOption("-i, --id ", "The id of the person", myParseInt) + .action((options) => { + if (options.id) getPerson(options.id); }); program .command("get-movies") .description("Make a network request to fetch movies") - .action(function handleAction() { - console.log("hello-world"); + .option("-p, --popular", "Fetch the most popular movies") + .option("-n, --now-playing", "Fetch the movies that are being played now") + .option("-s --save", "Save the fetched data into a JSON file") + .option("-l --local", "Read the data from your local JSON file") + .requiredOption( + "--page ", + "The page of movies data results to fetch", + myParseInt + ) + .action((options) => { + getMovies(options.page, options.nowPlaying, options.save, options.local); }); program .command("get-movie") .description("Make a network request to fetch the data of a single person") - .action(function handleAction() { - console.log("hello-world"); + .requiredOption("-i, --id ", "The id of the movie", myParseInt) + .option("-r, --reviews", "Fetch the reviews of the movie") + .action((options) => { + getMovie(options.id, options.reviews); }); +// Options + // error on unknown commands program.parse(process.argv); diff --git a/src/utils/chalk.js b/src/utils/chalk.js new file mode 100644 index 0000000..463e530 --- /dev/null +++ b/src/utils/chalk.js @@ -0,0 +1,14 @@ +const chalk = require("chalk"); + +const line = chalk.white("\n----------------------------------------\n"); + +module.exports = { + white: chalk.white, + blue: chalk.blue, + magenta: chalk.magenta, + red: chalk.red, + line: line, + boldBlue: chalk.bold.blue, + gray: chalk.gray, + yellow: chalk.yellow, +}; diff --git a/src/utils/fetchFromLocal.js b/src/utils/fetchFromLocal.js new file mode 100644 index 0000000..699d436 --- /dev/null +++ b/src/utils/fetchFromLocal.js @@ -0,0 +1,43 @@ +const fs = require("fs"); +const notifier = require("node-notifier"); + +function fetchFromLocal(type) { + let path = "src/files"; + switch (type) { + case "persons": + path = "src/files/persons/persons.json"; + break; + case "now-playing": + path = "src/files/movies/now-playing-movies.json"; + break; + case "most-popular": + path = "src/files/movies/popular-movies.json"; + break; + default: + break; + } + return new Promise((resolve, reject) => { + fs.access(path, fs.F_OK, (err) => { + if (err) { + spinner.fail("The file does not exist"); + console.log(red(err)); + return; + } + + fs.readFile(path, (err, data) => { + if (err) { + console.log(red(err)); + reject(); + } else { + notifier.notify({ + title: "Stored Persons Data", + message: "Your data was perfectly saved!", + }); + resolve(JSON.parse(data)); + } + }); + }); + }); +} + +module.exports = fetchFromLocal; diff --git a/src/utils/getMovieReq.js b/src/utils/getMovieReq.js new file mode 100644 index 0000000..538c563 --- /dev/null +++ b/src/utils/getMovieReq.js @@ -0,0 +1,16 @@ +const https = require("https"); +require("dotenv/config"); +const req = require("./req"); + +function request(id, reviews) { + const api_key = process.env.API_KEY; + let url = `https://api.themoviedb.org/3/movie/${id}?api_key=${api_key}`; + + reviews + ? (url = `https://api.themoviedb.org/3/movie/${id}/reviews?api_key=${api_key}`) + : null; + + return req(url); +} + +module.exports = request; diff --git a/src/utils/getMovieSpinner.js b/src/utils/getMovieSpinner.js new file mode 100644 index 0000000..a2248cc --- /dev/null +++ b/src/utils/getMovieSpinner.js @@ -0,0 +1,72 @@ +const ora = require("ora"); +const getMovie = require("./getMovieReq"); +const { white, red, line, boldBlue, yellow } = require("./chalk"); + +function spinner(id, reviews) { + const spinner = ora("Fetching movie's data...").start(); + spinner.color = "green"; + spinner.spinner = "aesthetic"; + + setTimeout(async () => { + try { + const movie = await getMovie(id, reviews); + + if (!reviews) { + console.log(line, "Movie:\n"); + console.log(`ID: ${white(movie.id)}`); + console.log(`Title: ${boldBlue(movie.title)}`); + console.log(`Release Date: ${white(movie.release_date)}`); + console.log(`Overview: ${boldBlue(movie.overview)}\n`); + + console.log(white(`\nGenres:`)); + if (movie.genres.length > 0) { + movie.genres.forEach((genre) => { + console.log(`\t${white(genre.name)}`); + }); + } else { + console.log( + `\nThe movie ${yellow(movie.id)} does not have any declared genre\n` + ); + } + console.log(white(`\nSpoken Languages:`)); + if (movie.spoken_languages.length > 0) { + movie.spoken_languages.forEach((language) => { + console.log(`\t${white(language.english_name)}`); + }); + } else { + console.log( + `\nThe movie ${yellow( + movie.id + )} doesn't have any declared language\n` + ); + } + spinner.succeed("\nMovie's data loaded!"); + } else { + if (movie.results.length > 0) { + if (movie.total_pages >= movie.page) { + movie.results.forEach((review) => { + console.log(`Author: ${boldBlue(review.author)}`); + if (review.content.length < 400) { + console.log(`Content: ${white(review.content)}`); + } else { + let content = review.content.slice(0, 400); + console.log(`Content: ${white(content)}...`); + } + console.log(line); + }); + console.log(`Page: ${movie.page} of ${movie.total_pages}`); + } + } else { + console.log(yellow(`The movie ${movie.id} does not have any review`)); + } + spinner.succeed("\nMovie reviews loaded!"); + } + } catch (err) { + spinner.fail("There was an error with the data"); + console.log(red(err)); + } + spinner.stop(); + }, 2000); +} + +module.exports = spinner; diff --git a/src/utils/getMoviesReq.js b/src/utils/getMoviesReq.js new file mode 100644 index 0000000..8a62d53 --- /dev/null +++ b/src/utils/getMoviesReq.js @@ -0,0 +1,16 @@ +const https = require("https"); +require("dotenv/config"); +const req = require("./req"); + +function request(pageNumber, nowPlaying) { + const api_key = process.env.API_KEY; + let url = `https://api.themoviedb.org/3/movie/popular?api_key=${api_key}&page=${pageNumber}`; + + nowPlaying + ? (url = `https://api.themoviedb.org/3/movie/now_playing?api_key=${api_key}&page=${pageNumber}`) + : null; + + return req(url); +} + +module.exports = request; diff --git a/src/utils/getMoviesSpinner.js b/src/utils/getMoviesSpinner.js new file mode 100644 index 0000000..776ae2e --- /dev/null +++ b/src/utils/getMoviesSpinner.js @@ -0,0 +1,77 @@ +const ora = require("ora"); +const getMovies = require("./getMoviesReq"); +const { white, boldBlue, red, line } = require("./chalk"); +const saveData = require("./saveData"); +const fetchFromLocal = require("./fetchFromLocal"); + +function spinner(pageNumber, nowPlaying, save, local) { + const spinner = ora("Fetching movies...").start(); + spinner.spinner = "monkey"; + + setTimeout(async () => { + if (local && nowPlaying) { + try { + const localData = await fetchFromLocal("now-playing"); + localData.forEach((element) => { + console.log("\nMovie:\n"); + console.log(`ID: ${white(element.id)}`); + console.log(`Title: ${boldBlue(element.title)}`); + console.log(`Release Date: ${white(element.release_date)}\n`); + }); + line; + spinner.succeed("Data successfully read from local JSON!"); + } catch (err) { + spinner.fail("There was an error reading your local data"); + console.log(red(err)); + } + } else if (local && !nowPlaying) { + try { + const localData = await fetchFromLocal("most-popular"); + localData.forEach((element) => { + console.log("\nMovie:\n"); + console.log(`ID: ${white(element.id)}`); + console.log(`Title: ${boldBlue(element.title)}`); + console.log(`Release Date: ${white(element.release_date)}\n`); + }); + line; + spinner.succeed("Data successfully read from local JSON!"); + } catch (err) { + spinner.fail("There was an error reading your local data"); + console.log(red(err)); + } + } else { + try { + const res = await getMovies(pageNumber, nowPlaying); + + if (save && nowPlaying) { + saveData("now-playing", JSON.stringify(res.results)); + spinner.succeed("Movies in the theatres right now have been stored!"); + } else if (save && !nowPlaying) { + saveData("most-popular", JSON.stringify(res.results)); + spinner.succeed("The most popular movies have been stored!"); + } else { + res.results.forEach((element) => { + console.log("\nMovie:\n"); + console.log(`ID: ${white(element.id)}`); + console.log(`Title: ${boldBlue(element.title)}`); + console.log(`Release Date: ${white(element.release_date)}\n`); + }); + console.log( + line, + white(`Page: ${pageNumber} of ${res.total_pages}\n`) + ); + nowPlaying + ? spinner.succeed("Movies in the theatres right now loaded!") + : spinner.succeed("Most popular movies loaded!"); + } + } catch (err) { + spinner.fail("There was an error with the data"); + console.log(red(err)); + } + } + + spinner.stop(); + }, 2000); +} + +module.exports = spinner; diff --git a/src/utils/getPersonReq.js b/src/utils/getPersonReq.js new file mode 100644 index 0000000..c0cafc2 --- /dev/null +++ b/src/utils/getPersonReq.js @@ -0,0 +1,12 @@ +const https = require("https"); +require("dotenv/config"); +const req = require("./req"); + +function request(id) { + const api_key = process.env.API_KEY; + const url = `https://api.themoviedb.org/3/person/${id}?api_key=${api_key}`; + + return req(url); +} + +module.exports = request; diff --git a/src/utils/getPersonSpinner.js b/src/utils/getPersonSpinner.js new file mode 100644 index 0000000..c019ab1 --- /dev/null +++ b/src/utils/getPersonSpinner.js @@ -0,0 +1,56 @@ +const ora = require("ora"); +const getPerson = require("./getPersonReq"); +const { + white, + magenta, + red, + line, + boldBlue, + gray, + yellow, +} = require("./chalk"); + +function spinner(id) { + const spinner = ora("Fetching the person's data...").start(); + spinner.color = "blue"; + spinner.spinner = "circleHalves"; + + setTimeout(async () => { + try { + const person = await getPerson(id); + + console.log(line, "Person:\n"); + console.log(`ID: ${white(person.id)}`); + console.log(`Name: ${boldBlue(person.name)}`); + console.log( + `Birthday: ${white(person.birthday)} ${gray("|")} ${white( + person.place_of_birth + )}` + ); + + person.known_for_department === "Acting" + ? console.log(`Department: ${magenta(person.known_for_department)}`) + : null; + + console.log(`Biography: ${boldBlue(person.biography)}`); + + if (person.also_known_as.length > 0) { + console.log(white(`\nAlso known as:\n`)); + person.also_known_as.forEach((alias) => { + console.log(white(alias) + "\n"); + }); + } else { + console.log( + `\n${yellow(person.name)} doesn't have any alternative name\n` + ); + } + spinner.succeed("Person's data loaded"); + } catch (err) { + spinner.fail("There was an error with the data"); + console.log(red(err)); + } + spinner.stop(); + }, 2000); +} + +module.exports = spinner; diff --git a/src/utils/getPersonsReq.js b/src/utils/getPersonsReq.js new file mode 100644 index 0000000..2df7604 --- /dev/null +++ b/src/utils/getPersonsReq.js @@ -0,0 +1,12 @@ +const https = require("https"); +require("dotenv/config"); +const req = require("./req"); + +function request(pageNumber) { + const api_key = process.env.API_KEY; + const url = `https://api.themoviedb.org/3/person/popular?api_key=${api_key}&page=${pageNumber}`; + + return req(url); +} + +module.exports = request; diff --git a/src/utils/getPersonsSpinner.js b/src/utils/getPersonsSpinner.js new file mode 100644 index 0000000..b32ddf4 --- /dev/null +++ b/src/utils/getPersonsSpinner.js @@ -0,0 +1,108 @@ +const ora = require("ora"); + +const getPersons = require("./getPersonsReq"); +const { white, blue, magenta, red, line } = require("./chalk"); +const saveData = require("./saveData"); +const fetchFromLocal = require("./fetchFromLocal"); + +function spinner(pageNumber, save, local) { + const spinner = ora("Fetching the popular people's data...").start(); + spinner.color = "yellow"; + spinner.spinner = "boxBounce2"; + + setTimeout(async () => { + if (local) { + try { + const localData = await fetchFromLocal("persons"); + localData.forEach((element) => { + console.log("Person:\n"); + console.log(`ID: ${white(element.id)}`); + console.log(`Name: ${blue(element.name)}`); + + element.known_for_department === "Acting" + ? console.log( + `Department: ${magenta(element.known_for_department)}` + ) + : null; + + if (element.known_for.some((element) => element.title)) { + console.log("Appearing in movies:\n"); + element.known_for.forEach((movie) => { + if (movie.title !== undefined) { + console.log(`\tMovie:`); + console.log(`\tID: ${white(movie.id)}`); + console.log(`\tRelease Date: ${white(movie.release_date)}`); + console.log(`\tTitle: ${white(movie.title)}\n`); + } + }); + } else { + console.log(`${element.name} doesn't appear in any movie\n`); + } + }); + console.log(line, white(`Page: ${pageNumber}\n`)); + spinner.succeed("Data successfully read from local JSON!"); + } catch (err) { + spinner.fail("There was an error reading your local data"); + console.log(red(err)); + } + } else { + try { + const res = await getPersons(pageNumber); + + if (save) { + saveData("persons", JSON.stringify(res.results)); + spinner.succeed("Your data was stored!"); + // : spinner.fail("There was a problem storing your data"); + } else { + res.results.forEach((element) => { + console.log("Person:\n"); + console.log(`ID: ${white(element.id)}`); + console.log(`Name: ${blue(element.name)}`); + + element.known_for_department === "Acting" + ? console.log( + `Department: ${magenta(element.known_for_department)}` + ) + : null; + + if (element.known_for.some((element) => element.title)) { + console.log("Appearing in movies:\n"); + element.known_for.forEach((movie) => { + if (movie.title !== undefined) { + console.log(`\tMovie:`); + console.log(`\tID: ${white(movie.id)}`); + console.log(`\tRelease Date: ${white(movie.release_date)}`); + console.log(`\tTitle: ${white(movie.title)}\n`); + } + }); + } else { + console.log(`${element.name} doesn't appear in any movie\n`); + } + }); + console.log( + line, + white(`Page: ${pageNumber} of ${res.total_pages}\n`) + ); + spinner.succeed("Data successfully fetched!"); + } + } catch (err) { + spinner.fail("There was an error with the data"); + console.log(red(err)); + } + } + + spinner.stop(); + }, 2000); +} + +module.exports = spinner; + +//CALLBACK FUNCTION OPTION + +// const request = req(pageNumber, (succeed) => { +// if (succeed) { +// spinner.succeed("Data successfully fetched!"); +// } else { +// spinner.fail("There was an error with the data"); +// } +// }); diff --git a/src/utils/parseInt.js b/src/utils/parseInt.js new file mode 100644 index 0000000..976ec81 --- /dev/null +++ b/src/utils/parseInt.js @@ -0,0 +1,10 @@ +function myParseInt(value, dummyPrevious) { + // parseInt takes a string and a radix + const parsedValue = parseInt(value, 10); + if (isNaN(parsedValue)) { + throw new commander.InvalidArgumentError("Not a number."); + } + return parsedValue; +} + +module.exports = myParseInt; diff --git a/src/utils/req.js b/src/utils/req.js new file mode 100644 index 0000000..2c42c5d --- /dev/null +++ b/src/utils/req.js @@ -0,0 +1,44 @@ +const https = require("https"); +require("dotenv/config"); + +function promise(url) { + return new Promise((resolve, reject) => { + const req = https.request(url, (res) => { + if (res.statusCode == 200) { + let body = ""; + res.on("data", (chunk) => { + body += chunk; + }); + res.on("end", () => { + const json = JSON.parse(body); + resolve(json); + }); + } else { + reject(`ERROR STATUS: ${res.statusCode}`); + } + }); + req.end(); + }); +} + +module.exports = promise; + +//CALLBACK FUNCTION OPTION +// const req = https.request(url, (res) => { +// console.log(`HEADERS: ${JSON.stringify(res.headers)}`); +// console.log(res.statusCode); +// if (res.statusCode == 200) { +// let body = ""; +// res.on("data", (chunk) => { +// body += chunk; +// }); +// res.on("end", () => { +// const json = JSON.parse(body); +// callback(true); +// console.log(json); +// }); +// } else { +// console.log(`ERROR STATUS: ${res.statusCode}`); +// callback(false); +// } +// }); diff --git a/src/utils/saveData.js b/src/utils/saveData.js new file mode 100644 index 0000000..45cd04e --- /dev/null +++ b/src/utils/saveData.js @@ -0,0 +1,39 @@ +const fs = require("fs"); +const notifier = require("node-notifier"); + +function saveData(type, data) { + let path = "src/files"; + switch (type) { + case "persons": + path = "src/files/persons/persons.json"; + break; + case "now-playing": + path = "src/files/movies/now-playing-movies.json"; + break; + case "most-popular": + path = "src/files/movies/popular-movies.json"; + break; + default: + break; + } + fs.access(path, fs.F_OK, (err) => { + if (err) { + spinner.fail("The file does not exist"); + console.log(red(err)); + return; + } + + fs.writeFile(path, Buffer.from(data), (err) => { + if (err) { + console.log(red(err)); + } else { + notifier.notify({ + title: "Stored Persons Data", + message: "Your data was perfectly saved!", + }); + } + }); + }); +} + +module.exports = saveData;