Skip to content
This repository was archived by the owner on Apr 8, 2023. It is now read-only.

Latest commit

 

History

History
36 lines (22 loc) · 957 Bytes

File metadata and controls

36 lines (22 loc) · 957 Bytes

🚨🚨 Archived. Please see if @iptv/xmltv can fulfil your needs, you will need to write a serializer to output JSON:API structure.

XMLTV to JSON:API Build Status Code Climate issues

Make use of JSON:API's relationship model to work with XMLTV data

Install

$ yarn add xmltv-to-jsonapi

Usage

const fs = require('fs');
const xmltvToJsonapi = require('xmltv-to-jsonapi');

const xmltvData = fs.readFileSync('examples/epg.xml', 'utf-8');

(async () => {
  const result = await xmltvToJsonapi(xmltvData);

  // do something with your json
})();

API

xmltvToJsonapi(input)

input

Type: string | buffer

Takes in the XMLTV data as a string or file buffer