Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

Commit

Permalink
Update README with examples, features and formats
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnault committed May 22, 2015
1 parent 23f6040 commit 919fd8a
Showing 1 changed file with 63 additions and 4 deletions.
67 changes: 63 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,77 @@ Movie showtimes around the globe.
[![Build Status](https://img.shields.io/travis/anault/projection.svg?style=flat-square)](https://travis-ci.org/anault/projection)
[![Coverage Status](https://img.shields.io/coveralls/anault/projection.svg?style=flat-square)](https://coveralls.io/r/anault/projection)

<!---
## Installation
Coming soon!
<!--
```bash
npm install projection
```
-->

## Quickstart
```javascript
var Projection = require('projection');
var p = new Projection();

p.findTheaters('Montreal', {}, function(err, theaters) {
console.log(theaters);
});

p.findMovie('Montreal', 'Mad Max', {}, function(err, movie) {
console.log(movie);
});
```

## How to use
##How it works
#### projection.findTheaters(near, options, callback);
Returns an array of theaters (and their showtimes) following this structure:
```javascript
{
name: 'Cineplex Odeon Forum Cinemas',
address: '2313 Sainte-Catherine Street West, Montreal, QC, Canada',
phone: '(514) 904-1274',
note: '',
movies: [
{
title: 'Insurgent 3D',
duration: '1hr 59min',
rating: 'Rated G',
genre: 'Action/Adventure/Romance',
trailer: 'http://www.youtube.com/watch...',
showtimes:[ '18:00', '20:15' ]
},
// Other movies...
]
}
```
#### projection.findMovie(near, movieName, options, callback);
Returns the movie and its showtimes in the nearest theaters following this structure:
```javascript
// Coming soon!
{
title:'Mad Max: Fury Road',
desc:'Haunted by his turbulent past, Mad Max believes[...]',
director:'George Miller',
cast:[ 'Charlize Theron', 'Tom Hardy' ],
duration:'2hr 0min',
rating:'Rated 13+',
genre:'Action/Adventure/Scifi/Fantasy',
trailer:'http://www.youtube.com/watch[...]',
theaters:[
{
name:'Scotiabank Theatre Montreal',
address:'977 rue Sainte-Catherine Ouest, Montreal, QC, Canada',
showtimes:[ '19:50', '22:15' ]
},
// More theaters...
]
}
```

##Features
- Multi-lang support
- Caching of repeated calls
- More to come...

##Wanna help?
Any contribution is welcomed!
-->

0 comments on commit 919fd8a

Please sign in to comment.