Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vot.js

Package Overview
Dependencies
Maintainers
0
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vot.js

Unoffical library for interacting with the Yandex VOT API

  • 1.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

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

Keywords

FAQs

Package last updated on 18 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc