omidcity-ticketselling
v0.1.3
Published
A 3D POV View of desired cinema with the ability of booking seats
Downloads
241
Readme
Cinema Ticket Embedder A lightweight npm package to embed a 3D ticket-selling system in third-party websites using an iframe. This package dynamically creates and integrates an iframe into the host website, allowing seamless embedding of your 3D ticket-selling platform.
Features Easily embed your 3D ticket-selling application via an iframe. Pass the cinema ID dynamically as a parameter. Lightweight and simple integration. Installation Install the package via npm:
npm install cinema-ticket-embedder
Usage Import the package in your project:
import embedTicketSystem from 'cinema-ticket-embedder';
Use the function to embed the iframe by passing the cinema ID as an argument:
embedTicketSystem('12345'); This will embed the iframe pointing to the 3D ticketing platform for the cinema with ID 12345.
Parameters Parameter Type Description cinemaId String The unique identifier for the cinema. Example javascript Copy code import embedTicketSystem from 'cinema-ticket-embedder';
document.addEventListener('DOMContentLoaded', () => { const cinemaId = '67890'; // Example cinema ID embedTicketSystem(cinemaId); }); How It Works The package:
Dynamically creates an iframe element. Sets the iframe src to your 3D ticket-selling platform with the cinemaId as a query parameter. Appends the iframe to the document.body. iframe URL Structure The iframe URL will be structured as follows:
ruby Copy code https://yourwebsite.com/?cinemaId= Ensure your 3D ticket-selling platform can process the cinemaId query parameter to display the correct cinema data.
Development For contributors:
Clone the repository and make necessary changes. Test locally using a test web project. Submit a pull request for review. License MIT License.