Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stylesuxx/eztvapi.re
NPM module for eztvapi.re
https://github.com/stylesuxx/eztvapi.re
Last synced: about 1 month ago
JSON representation
NPM module for eztvapi.re
- Host: GitHub
- URL: https://github.com/stylesuxx/eztvapi.re
- Owner: stylesuxx
- Created: 2015-10-12T22:42:04.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-13T23:33:47.000Z (about 9 years ago)
- Last Synced: 2024-10-06T09:46:44.702Z (about 1 month ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# eztvapi.re API wrapper
[![Build pass](https://travis-ci.org/stylesuxx/eztvapi.re.svg?branch=master)](https://travis-ci.org/stylesuxx/eztvapi.re.to?branch=master) [![Dependencies](https://david-dm.org/stylesuxx/eztvapi.re.svg)](https://david-dm.org/stylesuxx/eztvapi.re)This is a *JavaScript* wrapper for [eztvapi.re](http://eztvapi.re) that returns promises.
Calls to the classes methods return promises.
The parameters for the methods are the mandatory fields. Where optional fields may be passed this may be done via options object. For optional parameters please refer to the [eztvapi.re API](https://github.com/popcorn-official/popcorn-api/blob/master/README.md). JSON is returned directly as the API returns it.
## Installation
npm install eztvapi.re --save## Usage example
``` JavaScript
var EZTV = require('eztvapi.re');
var eztv = new EZTV();eztv.getShows('1', {keywords: 'Breaking Bad'}).then( function(shows) {
console.log(shows);
});
```## Available methods
The *EZTV* class provides the following methods:### Default API Methods
* getPages()
* getShows(page, options = {})
* getDetails(id)### Custom API Methods
These methods are in place to have some more comfort working with the API.
* search(keywords, page = 1, options = {})## Testing
An extensive test suite is provided and may be invoked by running:npm run test