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
- Host: GitHub
- URL: https://github.com/hirako2000/netflixroulette-js
- Owner: hirako2000
- License: mit
- Created: 2017-02-11T14:03:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-09T22:22:24.000Z (over 8 years ago)
- Last Synced: 2025-03-19T06:42:42.091Z (over 1 year ago)
- Topics: netflix, netflixroulette, promise, wrapper, wrapper-api
- Language: JavaScript
- Size: 4.88 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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!