https://github.com/antrikshy/netflixroulette_nodejs
Node.js wrapper for the NetflixRoulette API
https://github.com/antrikshy/netflixroulette_nodejs
Last synced: 6 months ago
JSON representation
Node.js wrapper for the NetflixRoulette API
- Host: GitHub
- URL: https://github.com/antrikshy/netflixroulette_nodejs
- Owner: Antrikshy
- License: mit
- Created: 2014-09-22T09:44:29.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-10T03:47:48.000Z (over 11 years ago)
- Last Synced: 2024-10-29T05:38:40.593Z (about 1 year ago)
- Language: JavaScript
- Size: 129 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
NetflixRoulette Node.js API
===========================
[](https://www.npmjs.org/package/netflix-roulette)
[](https://www.npmjs.org/package/netflix-roulette)
[](https://www.npmjs.org/package/netflix-roulette)
A very simple, fully-functional Node wrapper for [NetflixRoulette's API](http://netflixroulette.net/api/) that I wrote for some practical experience with Node. Add this module as a dependency in your Node project to access NetflixRoulette with a few easy-to-use functions.
Instructions
------------
###Install
Use `npm install netflix-roulette` in your Node.js project folder.
This will create a new `node_modules` folder if one does not already exist. Add it to your dependencies in `package.json`.
###Require
`var NetflixRoulette = require('netflix-roulette');`
###Use
The API currently has three parameters, `title`, `actor` and `director`. This module allows you to query any of them through rather intuitive functions. Since it is an open API, you do not need keys or authentication of any sort.
1. `NetflixRoulette.title('Tucker & Dale vs. Evil', callbackFunc(error, data), 2010);`
[year parameter is optional]
2. `NetflixRoulette.actor('Keira Knightley', callbackFunc(error, data));`
3. `NetflixRoulette.director('Christopher Nolan', callbackFunc(error, data));`
The `error` value is set only when there is a problem requesting data from the API. Any errors in *finding* the data will be reported in the `data` variable with `error == null`.
Refer to [NetflixRoulette's API guide](http://netflixroulette.net/api/) for details on returned data.
Contact
-------
Report any bugs from the [Issues section](https://github.com/Antrikshy/NetflixRoulette_NodeJS/issues).
If you have any questions, contact me [@Antrikshy](http://twitter.com/Antrikshy). You can reach, Andrew, the developer of NetflixRoulette [@CodeusaSoftware](https://twitter.com/codeusasoftware).