cinemeta.js
Version:
A Simple Name To IMDB Finder based on cinemeta
108 lines (90 loc) • 1.78 kB
Markdown
# Cinemeta.js
Fetch imdb Data with only the name on cinemeta
# Usage
### Search
- Importing Package
```js
const cinemeta = require("cinemeta.js")
```
- Searching Movies/Series
```js
cinemeta.search("Interstellar").then(data =>{
console.log(data)
})
/*
Expected Output
[
{
_id: '53677f23847ccc8123a1d0bd',
imdb_id: 'tt0816692',
name: 'Interstellar',
type: 'movie',
year: '2014'
},
{
_id: '5ab2308653336c1ba83785a2',
imdb_id: 'tt4172224',
type: 'movie',
name: "Interstellar: Nolan's Odyssey",
year: '2014'
},
{
_id: '5518e057cc9eee85bb52dc70',
imdb_id: 'tt4415360',
name: 'The Science of Interstellar',
year: '2015',
type: 'movie'
}
]
*/
```
- Searching Only Movies
```js
cinemeta.searchMovie("Inception").then(got =>{
console.log(got)
})
```
- Searching Only Series
```js
cinemeta.searchSeries("The Bear").then(got =>{
console.log(got)
})
```
### Searching on the basis of the year
- Searching Movies/Series
```js
cinemeta.searchOTBOYear("2023").then(data =>{
console.log(data)
})
```
- Searching Only Movies
```js
cinemeta.searchOTBOYearMovie("2023").then(got =>{
console.log(got)
})
```
- Searching Only Series
```js
cinemeta.searchOTBOYearSeries("2023").then(got =>{
console.log(got)
})
```
### Random Movie/Series
- Random output Movies/Series
```js
cinemeta.random().then(data =>{
console.log(data)
})
```
- Random output Only Movies
```js
cinemeta.random("2023").then(got =>{
console.log(got)
})
```
- Random output Only Series
```js
cinemeta.random("2023").then(got =>{
console.log(got)
})
```