afacinemas
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

afacinemas.js 🎥

A web scraper library for AFA Cinemas

npm version License: MIT

Installation

npm install afacinemas

Usage

ES6

import { getTheaters, getReleases } from 'afacinemas';

Promise.all([getTheaters(), getReleases()]).then(([theaters, releases]) => {
  console.log(theaters);
  console.log(releases);
});

CommonJS

const { getTheaters, getReleases } = require('afacinemas');

Promise.all([getTheaters(), getReleases()]).then(([theaters, releases]) => {
  console.log(theaters);
  console.log(releases);
});

API

getTheaters()

Fetches the list of theaters.

import { getTheaters } from 'afacinemas';

getTheaters().then(theaters => {
  console.log(theaters);
});

getReleases()

Fetches the list of next releases.

import { getReleases } from 'afacinemas';

getReleases().then(releases => {
  console.log(releases);
});

getSessions(theaterId, sessionsDate)

Fetches the list of sessions for a given theater and date.

import { getSessions } from 'afacinemas';

getSessions(12, '2023-09-20').then(sessions => {
  console.log(sessions);
});

Package Sidebar

Install

npm i afacinemas

Weekly Downloads

4

Version

0.2.0

License

MIT

Unpacked Size

52.3 kB

Total Files

43

Last publish

Collaborators

  • douglasgusson