Giter Club home page Giter Club logo

vk-types's Introduction

VK Types

npm npm

VK Types - это библиотека с TypeScript типами для работы с API ВКонтакте.

Версия VK API: 5.142

Установка

$ yarn add -D vk-types

или

$ npm i -D vk-types

Использование

Все типы были разделены на 3 раздела:

  • objects - основные объекты
  • methods - параметры и ответы методов
  • attachments - вложения для сообщений

Импортировать нужные типы можно тремя способами:

  1. Через глобальный index.ts:
import {
  VKUser,
  MessagesSend,
  MessagesSendParams,
  VKAttachment,
  VKAttachmentWallReply
} from 'vk-types';
  1. Через index.ts в каждом разделе:
import { VKUser } from 'vk-types/objects';
import { MessagesSend, MessagesSendParams } from 'vk-types/methods';
import { VKAttachment, VKAttachmentWallReply } from 'vk-types/attachments';
  1. Через сам файл с нужным типом:
import { VKUser } from 'vk-types/objects/VKUser';
import { MessagesSend, MessagesSendParams } from 'vk-types/methods/messages';
import { VKAttachment } from 'vk-types/attachments';
import { VKAttachmentWallReply } from 'vk-types/attachments/WallReply';

Поддерживаемые типы

На данный момент поддерживается довольно мало типов, но вы всегда можете помочь нам с их написанием.

Объекты

Папка с объектами

  • VKConversation - беседа
  • VKConversationPushSettings - настройки уведомлений беседы
  • VKGroup - сообщество
  • VKImage - фотография
  • VKKeyboard - клавиатура
  • VKLike - лайки
  • VKMessage - сообщения
  • VKUser - пользователь

Методы

Папка с методами

account

  • account.getCounters
  • account.getPushSettings

messages

  • messages.delete
  • messages.getById
  • messages.getConversationMembers
  • messages.getConversationsById
  • messages.getLongPollHistory
  • messages.getLongPollServer
  • messages.send

Вложения

Папка с вложениями

  • Geo
  • Wall
  • WallReply

Contributing

Вы всегда можете помочь проекту: добавить новое поле, изменить его описание или тип, или вовсе добавить новый объект, метод или вложение.

Сделать это можно, создав Pull Request в репозитории. Там мы проверим изменения, возможно внесем некоторые правки и примем их.

vk-types's People

Contributors

danyadev avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

furingleb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.