npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

moviefone

v0.1.0

Published

an API to get google new releases

Downloads

5

Readme

MovieFone (npm)

This module provides a Google Movies API for new releases around a location, returning a list of movies complete with theaters and showtimes. It's not using an official API, so it may be subject to break at any time.

About

This is heavily inspired by the npm moduleshowtimes. I really liked what Jon put together, just not the format of the response. I'm not loyal to any particular theater, so I rearranged the response to be movie-first, instead of theater-first.

Installation

npm install moviefone

API

There's not a lot to MovieFone:

MovieFone(location)

Our constructor. Sets the location for this instance.

  • location Sets the the default location for all requests. It can be a zipcode, coordinates, or a full address.

getNewReleases(date, page)

Recursively fetches new releases, and returns a promise. All arguments are optional.

  • page Fetches a single page of information. A location's result contains up to 10 pages. Defaults to fetching all pages.
  • date The number of days from now that you want showtimes for. So, 0 would be today, 1, would be tomorrow, 2 would be the day after tomorrow, etc. Defaults to 0.

Usage

ES6


import MovieFone from 'moviefone';

let moviefone = new MovieFone('63109', null);

moviefone.getNewReleases().then(response =>{ console.log(response); })
.catch(err => { console.log(err); });

ES5

var Releases = require('new-releases');

ver movies = new Releases('63109')
.then(response =>{ console.log(response); })
.catch(err => {console.log(err); });

Response

On success, it returns an array of movies names, with dates, times, descriptions, etc.

If the request succeeded, but failed to find any movies, it returns an additional error property.

{
meta: {
  type:'OK',
  message:null
},
movies: [ { name: 'Mission: Impossible - Rogue Nation',
  cast: [
    'Tom Cruise',
    'Jeremy Renner',
    'Simon Pegg',
    'Rebecca Ferguson',
    'Alec Baldwin'
    ],
  director: ['Christopher McQuarrie' ],
  description: 'Ethan and team take on their most impossible mission yet, eradicating the Syndicate - an International rogue organization as highly skilled as they are, committed to destroying the IMF.',
  rating: 'PG-13',
  runtime: '2hr 11min',
    theaters: [
  { id: '5e13ee8eb9646bb2',
    name: 'MX Movies',
    address: '618 Washington Avenue, St. Louis, MO',
    showtimes: [ '12:00pm', '3:05pm', '6:10pm', '9:15pm' ] },
  { id: 'de803b70bcd6d450',
    name: 'Moolah Theatre & Lounge',
    address: '3821 Lindell Blvd., St. Louis, MO',
    showtimes: [ '1:30pm', '4:15pm', '7:00pm', '9:45pm' ] },
  { id: 'e72f310265ce335f',
    name: 'Granite City Cinema',
    address: '1243 Niedringhaus Avenue, Granite City, IL',
    showtimes: [ '1:45pm', '4:30pm', '7:15pm' ] },
  { id: '509f1dc2b6bc1b1',
    name: 'AMC Esquire 7',
    address: '6706 Clayton Rd., Saint Louis, MO',
    showtimes: [ '9:45am', '1:00pm', '4:30pm', '7:40pm', '10:40pm' ] },
  { id: 'e8a90c7d333b5c98',
    name: 'Galleria 6 Cinemas',
    address: '30 Saint Louis Galleria, St. Louis, MO',
    showtimes: [ '10:45am', '1:30pm', '4:15pm', '7:00pm', '9:50pm' ] },
  { id: '44c134f8668f586d',
    name: 'Skyview Drive-In - Belleville',
    address: '5700 North Belt West, Belleville, IL',
    showtimes: [ '8:45pm' ] }
    ]
  }]