Skip to content

Commit

Permalink
readme 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
lacymorrow committed Feb 27, 2018
1 parent 7a72c0f commit 8efe0cb
Showing 1 changed file with 28 additions and 17 deletions.
45 changes: 28 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# movie-art [![npm version](https://badge.fury.io/js/movie-art.svg)](https://badge.fury.io/js/movie-art) [![Build Status](https://travis-ci.org/lacymorrow/movie-art.svg?branch=master)](https://travis-ci.org/lacymorrow/movie-art)

> Get a movie (or TV-series) poster image url in node: "Oceans Eleven" ➔ http://path/to/oceans_eleven_poster.jpg
> Get a movie (or TV-series) poster and backdrop image url: "Oceans Eleven" ➔ http://path/to/oceans_eleven_poster.jpg
[![movie-art](demo.svg)]()

Expand All @@ -15,52 +15,63 @@ $ npm install --save movie-art
## Usage

```js
var movieArt = require('movie-art');
var movieArt = require('movie-art')
```

// Basic usage
##### Basic usage
```js
movieArt('Oceans Eleven', function (err, url) {
console.log(url);
console.log(url)
//=> http://path/to/oceans_eleven_poster.jpg
});
})
```

// Usage with landscape orientation backdrop
##### Usage with landscape orientation backdrop
```js
movieArt('Oceans Eleven', {landscape: true}, function (err, url) {
console.log(url);
console.log(url)
//=> http://path/to/oceans_eleven_backdrop.jpg
});
})
```

// Usage with size and year options
##### Usage with size and year options
```js
movieArt('Oceans Eleven', {year: '1960', size: 'w92'}, function (err, url) {
console.log(url);
console.log(url)
//=> http://path/to/oceans_eleven_poster_1960_small.jpg
});
})
```

// Query television art
##### Query television art
```js
movieArt('Star Trek: The Original Series', {type: 'tv'}, function (err, url) {
console.log(url);
console.log(url)
//=> http://path/to/star_trek_the_original_series_poster.jpg
});
})

```

## API

### movieArt(movie [, options] [, callback])

Returns a Promise which resolves to a string URL

#### movie

*Required*
Type: `string`

Movie to search for.

#### callback(error, response)

#### callback(err, url)
Function to be called when complete or on error


### Options

A JavaScript object with the following properties
A JavaScript object with the following properties:

#### year

Expand Down Expand Up @@ -103,7 +114,7 @@ $ npm install --global movie-art

#### Usage

```bash
```
$ movie-art --help
Usage
Expand Down

0 comments on commit 8efe0cb

Please sign in to comment.