vkdart 2.3.1 copy "vkdart: ^2.3.1" to clipboard
vkdart: ^2.3.1 copied to clipboard

Package helps simplify working with the VK API. Completely wraps VK methods, has event support and much more.

example/example.dart

import 'package:vkdart/vkdart.dart';

void main() async {
  const groupId = 123456;
  final myFetcher = Longpoll(groupId);

  // Use callback API
  // final myFetcher = await Webhook.createHttpServer(
  //  secretKey: 'mySecretKey',
  //  confirmation: 'confirmationCode',
  // );

  final vkdart = VkDart('accessToken', fetcher: myFetcher);

  // message_new, message_edit, message_reply
  vkdart
      .onMessage()
      .where((event) => event.isUser)
      .listen((event) => event.sendMessage(message: 'hello world!'));

  // ignore: avoid_print
  await vkdart.start().then((_) => print('Longpoll API started!'));

  // use API
  // await vkdart.request('groups.getById', {'group_id': 1}); // List<Map<String, dynamic>>
}
6
likes
160
points
109
downloads

Publisher

unverified uploader

Weekly Downloads

Package helps simplify working with the VK API. Completely wraps VK methods, has event support and much more.

Repository (GitHub)
View/report issues

Topics

#vkontakte #vk #api #vk-api #http

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

http

More

Packages that depend on vkdart