@liveaxle/mediafly
v0.1.3
Published
Common Mediafly utilities for Liveaxle applications.
Downloads
7
Readme
Liveaxle - Mediafly (LAMF)
This repository is to provide a module for common tasks involving Mediafly API's within Liveaxle applications.
Installing
npm install @liveaxle/mediafly
;
Usage
ES6
import LAMF from '@liveaxle/mediafly'
;
LAMF.
Browser (and Angular 1.x)
import '@liveaxle/mediafly/bin/lamf.js'
or
<script src="node_modules/@liveaxle/mediafly/bin/lamf.js"></script>
Both of these reference options will give you:
window.LAMF
Reference
Models
Event
Intended for creating postEvent models.
** RIGHT NOW (12/20) THIS IS COUPLED TO A MllerCoors MODEL **
let event = new LAMF.Models.Event(<data {}>, <config {}>);
if(event.error) {
// validation failed - y u do dis?
} else {
// create post event
}
UViewEvent
Intended for creating postEvent models in NBCUView.
let event = new LAMF.Models.UViewEvent(<data {}>, <config {}>);
if(event.error) {
// validation failed - y u do dis?
} else {
// create post event
}
Developing
If you need to change the model simply add the new fields you need represented.
Please also run npm run test:event
after changing the model so we know there at least wont be any runtime errors.
Publishing
After making a change do the following to make your code available:
npm install
npm login
follow the prompt and log in to npm- Make sure your repo is up to date with any remote changes or else later commands will break
npm run build
npm version patch
- Commit the things
git push origin --tags
npm publish