Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/denexapp/vk-ts
Helpers to make requests to VK api
https://github.com/denexapp/vk-ts
typescript vk
Last synced: about 1 month ago
JSON representation
Helpers to make requests to VK api
- Host: GitHub
- URL: https://github.com/denexapp/vk-ts
- Owner: denexapp
- License: mit
- Created: 2020-07-25T18:07:30.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-21T05:17:33.000Z (over 1 year ago)
- Last Synced: 2024-10-01T10:02:46.805Z (about 1 month ago)
- Topics: typescript, vk
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/vk-ts
- Size: 1.33 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VK TypeScript
Typesafe lightweight library to make requests to VK api
[![GitHub license](https://img.shields.io/github/license/denexapp/vk-ts)](https://github.com/denexapp/vk-ts/blob/master/LICENSE) [![npm version](https://img.shields.io/npm/v/vk-ts.svg)](https://www.npmjs.com/package/vk-ts)
## Installation
Using npm:
```
npm install vk-ts
```Using yarn:
```
yarn add vk-ts
```## Usage
```typescript
import VK from 'vk-ts'// Learn how to get access token here:
// https://vk.com/dev/access_token
const accessToken = 'my_vk_api_token'
const vk = new VK(accessToken)const info = await vk.accountGetProfileInfo()
console.log(`Hello, ${info.first_name}!`)
```## Pros
- Typesafe
- Lightweight## Cons
- Small coverage of api
- No built-in authentication## Available api methods
- account.getProfileInfo
- docs.get
- docs.getUploadServer
- docs.save
- docs.upload
- messages.delete
- messages.messagesGetByConversationMessageId
- messages.messagesGetConversationMembers
- messages.messagesRemoveChatUser
- messages.messagesSearch
- messages.messagesSend
- messages.messagesSetActivity
- users.get
- utils.resolveScreenName
- video.save
- video.uploadHaven't found the method you're looking for? Open an issue [here](https://github.com/denexapp/vk-ts/issues/new)