kaltura-typescript-client

20.7.3 • Public • Published

Kaltura Typescript Client

Conventional Commits Gitter chat Build Status

An easy-to-use facade to Kaltura server with typescript support for action requests, classes and enums.

Instructions

Getting Started

To keep being update review the changelog frequently.

Features list

View list of features here.

Building the sources

This library is auto-generated using kaltura/clients-generator php engine. Feel free to clone, build and play with this library but in order to submit PR you should work against the kaltura/clients-generator repo.

Adding this library as a dependency to your project

Since this library was designed to be consumed directly and not using npmjs repository, you will need to do the following steps to add it to your project:

  1. run the following to transpile the library:
$ npm install
$ npm run deploy
  1. open folder dist and find a tar.gz file starting with kaltura-typescript-client-v.
  2. copy this file to your project (we recommend coping it to folder libs)
  3. run the following command
npm install file:the_path_to_the_file_including_its_name.tgz

make sure you prefix the path with file: as shown above.

An example of a vaild command will be: npm install file:libs/kaltura-typescript-client-v7.1.0-20173010-1053.tgz

  1. if you already have older version, delete that file. You should do this only after you installed the new version.

Using the library in production

You should follow the steps below to optimize the production build by bundling only the types being used.

The library has thousands of classes representing the data model of the server API. Usually, applications are using only friction of those types. Some toolchains drop the types that are not in actual use.

If you see that the bundle includes all the types or a log warning in the console like below, you should follow the steps mentioned in this section.

Notice! Your application bundle the whole package of kaltura-xxx-client (either rxjs/ngx/typescript), please refer to the library `readme.md` to reduce app bundle size.
  1. make sure you have dependency for babel-plugin-import.
  2. add plugin configuration to the babel file being used by your application.
{
  "plugins": [
    [
      "import", {
      "libraryName": "kaltura-typescript-client/api/types",
      "libraryDirectory": "",
      "camel2DashComponentName": false,
      "transformToDefaultImport": false
    }]
  ]
}

Running integration tests

  • In src/api/tests folder you should duplicate file tests-config.template.ts and name it tests-config.ts.
  • Modify the file content to include valid information.
  • Run npm run test to test the library

If you want to test the library against the production server use the following as the endpoint in the config file: http://www.kaltura.com/api_v3/index.php/

License and Copyright Information

All code in this project is released under the AGPLv3 license unless a different license for a particular library is specified in the applicable library path.

Copyright © Kaltura Inc. All rights reserved.

Readme

Keywords

Package Sidebar

Install

npm i kaltura-typescript-client

Weekly Downloads

849

Version

20.7.3

License

AGPL-3.0

Unpacked Size

15.9 MB

Total Files

5931

Last publish

Collaborators

  • noamtamim
  • omriceisler
  • roeisomech
  • sagivp
  • yossipapi
  • nivshlomokaltura
  • kaltura-inc
  • kaltura-ng2
  • eransakalkaltura