/markus-cinema-client

Primary LanguageJavaScriptMIT LicenseMIT

Markus Cinema Client

npm GitHub release

CircleCI Code Climate npm

JavaScript client for fetching data from cinemas that use MARKUS Cinema System.

Background

Multiple cinemas in Finland, Estonia, Latvia and Lithuania use MARKUS Cinema System that exposes XML with upcoming shows and more.

For example:

This is a promise-based JavaScript client that takes care of fetching the XML, parsing it and extracting the relevant data.

Usage

Install

yarn add markus-cinema-client
or
npm install --save markus-cinema-client

Use

import { getShows } from 'markus-cinema-client';


const options = { area: 1008, dt: '14.02.2017' };

getShows('http://www.forumcinemas.ee/xml', options).then((shows) => {
  ...
});

Features

Currently, only getShows for Schedule is implemented. However, most of the API-s also expose Areas, ScheduleDates, Events, News, etc.

For features and bugs, feel free to add issues or contribute.

Contributing

  1. Run tests in watch mode with yarn test:watch or npm run test:watch and ensure every line is tested. For a run-once check with ESLint, run yarn test or npm test.
  2. Bump version number according to semver and add an item that a release will be based on to CHANGELOG.md.
  3. Submit your pull request from a feature branch and get code reviewed.
  4. If the pull request is approved, coverage stays high and CircleCI build passes, you will be able to merge.
  5. Code will automatically be released to GitHub and published to npm.