vkdart 1.3.1
vkdart: ^1.3.1 copied to clipboard
Package helps simplify working with the VK API. Completely wraps VK methods, has event support and much more.
VkDart #
Package helps to make working with the VK API easier.
Chat discussion of the package - https://t.me/vk_dart
Features #
- Supports all methods. Has interfaces of all public VK methods.
- Reliable. Functionality of the package is wrapped in Unit tests
- Event support. Supports Callback API, Longpoll API
- Developing. Functionality is becoming more!
- Easy to use. Very easy to use!
Usage #
Initialization:
import 'package:vkdart/vkdart.dart';
void main() async {
final TOKEN = ''; // Group Token
final vkdart = VkDart(TOKEN, Event(), groupId: 123);
vkdart.start()
}
Listening to events:
// messages_new, message_edit, message_reply
vkdart.onMessage().listen((event) =>
print('message text: ${event.object['message']['text']}'));
Modifying Stream:
vkdart
.onComment()
.where((comment) => comment.type == UpdateType.photo_comment_new)
.listen((event) => print('There\'s a new comment on the photo!'));
Using API:
await vkdart.users.get({'user_id': 'durov'});
Future plans #
- Create contexts for received events
- Implement the VK Api keyboard interface
- Create a command constructor to simplify the creation of chatbots.
Bugs and feature requests #
Please send a bug report to issue tracker