npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

verizon-uplynk-api

v1.0.3

Published

Node.JS implementation of Verizon Uplynk APIs

Downloads

44

Readme

verizon-uplynk-api

Node.JS implementation of Verizon UpLynk APIs

verizon-uplynk-api implements two sets of API's provided by VDMS UpLynk:

  • API to access LiveSplicer (trans|en)coders;
  • API to access UpLynk cloud platform;

LiveSlicer API

LiveSlicer API is used to communicate with an instance of UpLynk Live Slicer running locally and uploading video to the cloud. For details of this API and available methods please see http://support.uplynk.com/doc_live_slicer_api.html.

To use this API, create an instance of LiveSlicer() and use LiveSlicer.request() passing the API method, parameters as object and a callback to asynchronously process the response.

See the documentation referenced above for a full list of methods available.

LiveSlicer API Example

const vzAPI = require('verizon-uplynk-api');
var liveSlicer = new vzAPI.LiveSlicer('http://10.122.173.51:65009');
liveSlicer.request('status',{},(response)=>{
    if (response.error) {
        console.log(`LiveSlicer access error ${response.error} ${response.msg}.`);
    } else {
        console.log(`LiveSlicer ${response.status.slicer_id} is sending ${response.status.signal}`);
    }
});

Output:

LiveSlicer myslicer1 is sending TS multicast 233.1.1.1:11112 1280x720    
    

Integration APIs

Integration API's at http://service.uplynk.com are used to communicate with the UpLynk cloud platform. For details of these API's see http://support.uplynk.com/doc_integration_apis.html.

To use these API's, create an instance of API(), then use API.request() passing the API "endpoint", parameters as object and a callback to asynchronously process the response.

See the documentation referenced above for a full list of endpoints available.

Integration APIs Example

const vzAPI = require('verizon-uplynk-api');
var api = new vzAPI.API( '06d6f896162146e3928032bb2e546837', 'rw6ZDVL/2Oz0tjIu3ha2tO5TCt3qOy+gqnbixXI8A');
// Fetch and print asset ID's
api.request('/api2/asset/list',{},(response)=>{
    if (response.error) {
        console.log(`Integration API access error ${response.error} ${response.msg}.`);
    } else {
        console.log(`Total ${response.assets.length} assets found:`);
        for ( a in response.assets ) {
            console.log(`   ${response.assets[a].id} ${response.assets[a].desc}`);
        }
    }
});

Output:

Total 6 assets found:
7e4f02e6e358486593d194bfc108b1cf realtime.mpg
1f3656434d1a4205bad477dea0a90982 safelite.ts
e91ebe7af2c449e792cb14947cf3beb0 safelite_30_640x360_264.ts
fbba907a1afb4a8d861a61477add7028 salonpas.ts
0fa8d090231c4503adc99e8a6291e91f wix.ts
a296e9cf4eac4cda9b525ebc0d4d5082 crizal.ts

Installation

verizon-uplynk-api is an NPM module. You can install it using npm:

npm install verizon-uplynk-api

Testing

Unit tests are using nodeunit.

Running unit tests would require you to have an active VDMS UpLynk account and a running instance of LiveSlicer with API enabled. To run tests, you will also need to create a config.json file in test directory. This JSON file is used to store your UpLink account credentials (userID/accountGUID and API key), and the URL of your LiveSlicer API. Obviously, I am not shipping mine with the module;).

The format of this file is:

{
    "liveSlicerURL": "<URL of the LiveSlicer API>",
    "liveSlicerURLAuth": "<URL of the Authenticated LiveSlicer API",
    "userID": "<User ID from Gears/Account Settings tab in CMS>",
    "apiKey": "<API Key from Gears/Playback Tokens tab in CMS>"
}

Once this is set up and LiveSlicer is running, execute

nodeunit

to run the tests.

Legal

License: MIT
Copyright © 2017 Crystal Computer Corp.
http://www.crystalcc.com