1.3.7 • Published 8 months ago

vot.js v1.3.7

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

vot.js

GitHub Actions npm ru en

An unofficial library for interacting with the Yandex VOT API, which supports working with JavaScript, TypeScript, and also has built-in parted types for Typebox.

The library supports working with worker servers, to do this, you need to create a VOTWorkerClient client and specify the domain of the worker server, for example vot-worker.toil.cc.

Installation

Installation for Bun:

bun add vot.js

Installation for NPM:

npm install vot.js

Getting started

To start working with the API, you need to create a VOT Client. This can be done using the line provided below.

Standard Client:

const client = new VOTClient();

const videoData = await client.getVideoData("https://youtu.be/LK6nLR1bzpI");

const result = await client.translateVideo({ videoData });

Proxying via vot-worker:

const client = new VOTWorkerClient({
  host: "vot.toil.cc",
});

You can see more code examples here

Limitations

  1. The library can't translate videos longer than 4 hours
  2. To translate udemy, coursera, coursehunter and other sites that have authorization, you must create your own handlers

Build

To build, you must have:

  • Bun
  • Protoc (if you are building with the update of the .proto file)

Don't forget to install the dependencies:

bun install

Build without updating .proto

This build option should be used in most cases if your changes do not affect the .proto file.

bun build:bun

Build with an update .proto

If you want to build the library by updating the proto files, then you need to install protoc 3+ and add it to the Path.

Building from Linux (maybe on MacOS it will work too):

bun rebuild:linux

Building from Windows:

bun rebuild:win

Building TypeScript types

You can use this build option if you only want to build types for TypeScript:

bun build:declaration

Building a TypeBox of Types

You can use this build option if you only want to build types for TypeBox:

bun build:typebox

Building only .proto file

You can use this build option if you only want to convert the .proto file to .ts (this will not update the file in the /dist folder):

Building from Linux (maybe on MacOS it will work too):

bun build:proto-linux

Building from Windows:

bun build:proto-win

Tests

The library has minimal test coverage to check its performance.

Run the tests:

bun test
1.3.7

8 months ago

1.3.6

8 months ago

1.3.5

8 months ago

1.2.0

10 months ago

1.2.8

9 months ago

1.2.7

9 months ago

1.2.6

9 months ago

1.3.4

8 months ago

1.2.5

9 months ago

1.3.3

8 months ago

1.2.4

10 months ago

1.3.2

8 months ago

1.2.3

10 months ago

1.3.1

9 months ago

1.2.2

10 months ago

1.3.0

9 months ago

1.2.1

10 months ago

1.2.9

9 months ago

1.0.2

10 months ago

1.1.0

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

0.3.0

11 months ago

0.2.0

11 months ago

0.7.2

10 months ago

0.7.1

11 months ago

0.5.0

11 months ago

0.4.0

11 months ago

0.7.0

11 months ago

0.6.1

11 months ago

0.6.0

11 months ago

0.0.1

1 year ago

0.0.0

1 year ago