3.3.0 • Published 7 years ago

mxd-heimdall v3.3.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Dependency Status devDependency Status

Installation

npm i --save mxd-heimdall

Initialisation

const { AssetsQuery, Heimdall } = require('mxd-heimdall');

const heimdall = new Heimdall({ appid: '<appid>', apikey: '<apikey>' });

Attention: mxd-heimdall will use several information from the package.json and add them to the headers. This makes it easier to identify the source of the request in the logs of heimdall if there are issues. The information which will be used:

  • from:
    • If the author is an object: ${author.name} <${author.email}> (${author.url})
    • If not, the string will be used
  • user-agent: ${appPkg.name} v${appPkg.version} via ${libPkg.name} v${libPkg.version}

Examples

Get information for a specific asset by ID

const assetId = <assetId>;
const query = new AssetsQuery(assetId);
const assets = await heimdall.getAssets(query);

Search assets by title and get the first 3 results

const title = '<title>';
const query = (new AssetsQuery())
  .filter('contentTypeSeriesOrMovies')
  .filter('search', title)
  .query('pageSize', 3);
const assets = await heimdall.getAssets(query);

Get the 50 newest store movies

const query = (new AssetsQuery())
  .filter('availableWithoutPackage')
  .filter('movies')
  .filter('new')
  .filter('notUnlisted')
  .query('pageSize', 50)
  .sort('activeLicenseStart', 'desc');
const assets = await heimdall.getAssets(query);
3.3.0

7 years ago

3.2.0

7 years ago

3.1.3

7 years ago

3.1.2

7 years ago

3.1.1

7 years ago

3.1.0

7 years ago

3.0.3

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

2.6.0

7 years ago

2.4.0

7 years ago

2.3.0

8 years ago

2.2.0

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago