Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/negezor/vk-io

Modern VK API SDK for Node.js
https://github.com/negezor/vk-io

api sdk vk vk-api vk-sdk

Last synced: 30 days ago
JSON representation

Modern VK API SDK for Node.js

Awesome Lists containing this project

README

        



NPM version
Build Status
NPM downloads

> **VK-IO** - This is a powerful [Node.js](https://nodejs.org) module that allows you to easily interact with the VK API 🚀

| 📖 [Documentation](https://negezor.github.io/vk-io/) | 🤖 [Examples](docs/examples/) |
| ---------------------------------------------------- | ----------------------------- |

## Features

1. **Complete.** `100%` coverage of the VK API
2. **Simple.** Predictable abstraction of VK API. 1 to 1 mapping of API method
```javascript
vk.api.users.get({ ... });
```
3. **Reliable.** The library is written in **TypeScript** and covered by tests.
4. **Modern.** The library comes with native ESM support
5. **Powerful.** Supports following additional features:
- **Proxy** support via Custom Agents;
- Automatic **request parallelization** for processing massive amounts of requests to API;
- User [Authorization](./packages/authorization/README.md) (even with login and password);
- [Ecosystem for bot development](#useful-modules-that-may-be-useful-to-you).

## 📦 Installation

> **[Node.js](https://nodejs.org/) 12.20.0 or newer is required**

- **Using `npm`** (recommended)
```shell
npm i vk-io
```
- **Using `Yarn`**
```shell
yarn add vk-io
```
- **Using `pnpm`**
```shell
pnpm add vk-io
```

## Example usage

```javascript
import { VK } from 'vk-io';

const vk = new VK({
token: process.env.TOKEN
});

async function run() {
const response = await vk.api.wall.get({
owner_id: 1
});

console.log(response);
}

run().catch(console.log);
```

## Community

### Useful modules that may be useful to you

- [@vk-io/stateless-prompt](packages/stateless-prompt): Simple implementation of stateless prompt
- [@vk-io/authorization](packages/authorization): Authorization by login & password, and etc...
- [@vk-io/streaming](packages/streaming): Receiving data with Streaming API
- [@vk-io/session](packages/session): Simple implementation of the sessions
- [@vk-io/scenes](packages/scenes): Simple implementation of middleware-based scene management
- [@vk-io/hear](packages/hear): Simple implementation of the hears
- [vk-io-question](https://github.com/fakemancat/vk-io-question): Simple promise-based prompt
- [vk-io-pages](https://github.com/MrZillaGold/vk-io-pages): Dynamic pages pagination module
- [henta](https://github.com/u14-team/henta): Simple VK bot engine
- [vk-io-redis-storage](https://github.com/xtcry/vk-io-redis-storage): Simple storage add-on for [@vk-io/session](packages/session)
- [nestjs-vk](https://github.com/xtcry/nestjs-vk): Module for [NestJS](https://github.com/nestjs/nest)

> If you want to add your module in the list, create a [new issue](https://github.com/negezor/vk-io/issues/new) in the repository.