Skip to content

Latest commit

 

History

History
45 lines (36 loc) · 2.07 KB

api.md

File metadata and controls

45 lines (36 loc) · 2.07 KB

API Reference

<a name="Pled"></a>

Pled

Kind: global class

new Pled(options)

Param Type Default Description
options Object | Array.<string> Pled options object or array of sources
options.sources Array.<string> Sources of m3u files. Each source is either a path to local file of a url to an http file (starting from "http://" or "https://")
[options.filters] Array.<FilterFunction> Sequence of filters
[options.cachePath] string Path to cache file
[options.cacheTime] int 52460601000 Time for cache in milliseconds. By default 5 days
[options.forceReload] boolean If cache file is specified this parameter allows to not use the cache but regenerate content (however resulting content still can be saved to the cache)

pled.handleRequest()

It is possible to use Pled in pair with Express.js. Handles HTTP request. See samples directory for an example.

Kind: instance method of Pled

pled.execute() ⇒

Processes play list sources and generates resulting playlist as string

Kind: instance method of Pled
Returns: Promise with a string value - content of m3u

pled.loadCache() ⇒ Promise.<CacheStatus>

Loads playlist from cache file.

Kind: instance method of Pled

API Documentation Generating

  • Do not modify api.md it will be regenerated. Modify 'tools/api.hbs' instead.
  • Regenerate readme: npm run-script docs