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 🙏

© 2025 – Pkg Stats / Ryan Hefner

uiza

v1.2.0

Published

Uiza API wrapper

Readme

Uiza Node.js Library

Welcome to your new package!

The Uiza Node library provides convenient access to the Uiza API from applications written in server-side JavaScript.

Introduction

This is the public API documents for Uiza version 4.0.

The Uiza API is organized around RESTful standard. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. JSON is returned by all API responses, including errors, although our API libraries convert responses to appropriate language-specific objects.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Authentication

In order, to use the Uiza, you should follow these steps:

  • Step 1: Having an active Uiza account. (If you don't have, please get here)
  • Step 2: Once you have an Uiza account, you can get a Token to call the APIs.

This Token will have right & permission related with your account.

Installation

Add this line to your package.json:

"dependencies": {
  "uiza": "1.2.0",
}

And then execute:

$ npm install

Or install it yourself as:

$ npm install uiza --save

Requirements

  • Node >=4

Usage

The library needs to be configured with your account's authorization (API key) and appId (App key).

See details here.

Node

const uiza = require('uiza');
uiza.authorization('your-authorization-key');
uiza.app_id('your-app-id');

Entity

These below APIs used to take action with your media files (we called Entity).

See details here.

const uiza = require('uiza');
uiza.authorization('your-authorization-key');
uiza.app_id('your-app-id');

const params = {
  'name': 'Sample Video',
  'url': 'https://example.com/video.mp4',
  'inputType': 'http',
  'description': 'tes'
};

uiza.entity.create(params).then((res) => {
  //Identifier of entity has been created
}).catch((err) => {
  //Error
});

Category

Category has been splits into 3 types: folder, playlist and tag. These will make the management of entity more easier.

See details here.

const uiza = require('uiza');
uiza.authorization('your-authorization-key');
uiza.app_id('your-app-id');

const params = {
  'name': 'Folder sample 2',
  'type': 'folder',
  'orderNumber': 1,
  'description': 'Folder description',
  'icon': 'https://exemple.com/icon.png'
};

uiza.category.create(params).then((res) => {
  //Identifier of category has been created
}).catch((err) => {
  //Error
});

Storage

You can add your storage (FTP, AWS S3) with UIZA. After synced, you can select your content easier from your storage to create entity.

See details here.

const uiza = require('uiza');
uiza.authorization('your-authorization-key');
uiza.app_id('your-app-id');

const params = {
  'name': 'axon',
  'description': 'axon of Uiza, use for transcode',
  'storageType': 'ftp',
  'host': 'axon-example.uiza.io',
  'username': 'uiza',
  'password': '=59x@LPsd+w7qW',
  'port': 21,
};

uiza.storage.add(params).then((res) => {
  //Identifier of storage has been add
}).catch((err) => {
  //Error
});

Live Streaming

These APIs used to create and manage live streaming event.

  • When a Live is not start : it's named as Event.
  • When have an Event , you can start it : it's named as Feed.

See details here.

const uiza = require('uiza');
uiza.authorization('your-authorization-key');
uiza.app_id('your-app-id');

const params = {
  'name': 'test event',
  'mode': 'push',
  'encode': 1,
  'dvr': 1,
  'description': 'This is for test event',
  'poster': '//image1.jpeg',
  'thumbnail': '//image1.jpeg',
  'linkStream': [
    'https://playlist.m3u8'
  ],
  'resourceMode': 'single'
};


uiza.live.create(params).then((res) => {
    //Identifier of event has been created
  }).catch((err) => {
    //Error
  });

Callback

Callback used to retrieve an information for Uiza to your server, so you can have a trigger notice about an entity is upload completed .

See details here.

const uiza = require('uiza');
uiza.authorization('your-authorization-key');
uiza.app_id('your-app-id');

const params = {
  'url': 'https://callback-url.uiza.co',
  'method': 'POST'
};

uiza.callback.create(params).then((res) => {
  //Identifier of callback has been created
}).catch((err) => {
  //Error
});

User Management

You can manage user with APIs user. Uiza have 2 levels of user: Admin - This account will have the highest priority, can have permission to create & manage users. User - This account level is under Admin level. It only manages APIs that relates to this account.

See details here.

const uiza = require('uiza');
uiza.authorization('your-authorization-key');
uiza.app_id('your-app-id');

const params = {
  'status': 1,
  'username': 'user_test_1',
  'email': '[email protected]',
  'fullname': 'User Test',
  'avatar': 'https://exemple.com/avatar.jpeg',
  'dob': '05/15/2018',
  'gender': 0,
  'password': 'FMpsr<4[dGPu?B#u',
  'isAdmin': 1
};

uiza.user.create(params).then((res) => {
  // Identifier of user has been created
}).catch((err) => {
  // Error
});

Embed Metadata

Embed metadata is information that can be embed into video/audio file. You can embed into file by adding a json compose these tag.

See details here.

Errors Code

Uiza uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with Uiza's servers.

See details here.

Development

Run all tests:

$ npm install
$ npm test

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/uizaio/api-wrapper-node. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Uiza project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.