An open API service indexing awesome lists of open source software.

https://github.com/hirako2000/netflixroulette-js

Netflixroulette js wrapper
https://github.com/hirako2000/netflixroulette-js

netflix netflixroulette promise wrapper wrapper-api

Last synced: over 1 year ago
JSON representation

Netflixroulette js wrapper

Awesome Lists containing this project

README

          

# netflixroulette-js
Netflixroulette js Promise wrapper

### What is this
- Low level http requests to netflixroulette API
- Zero dependency
- Returns a Promise
- Full API support - Search by Title, Year, Actor, Director

### Usage
Import module
```javascript
import netflix from 'netflixroulette-js';
```

Search by Title. This returns a single entry as per API
```javascript
netflix("Breaking Bad")
.then(function(response) {
console.log("Breaking Bad: " + JSON.stringify(response, null, 2));
}
).catch(function(error) {
console.log("Error " + error);
})
```

Search by Actor. This returns a set of entries, as per API
```javascript
netflix({'actor': 'jim carrey'})
.then(function(response) {
console.log("Jim carrey's movies: " + JSON.stringify(response, null, 2));
}
).catch(function(error) {
console.log("Error " + error);
})

```
### Other params
The request takes either a String (movie Title)
Or an Object containing
- Title and year
or
- Director
- Actor

Enjoy!

If you wish to contirbute, just fork and raise PR, this will get merged if adhering to existing code implicit conventions.

thanks!