vkio 1.3.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 76

vkio v1.3.3 #

A package which allows you to access to the VK API.

Features #

  • 100% coverage of the VK API

Usage #

import 'package:vkio/types.dart' show LanguageType;
import 'package:vkio/vk.dart';

Future<void> main() async {
  VK vk = VK(
    token: 'a35e27fbb06d242fa72551433d2da1607035f6cdba1244cee86a3087bdfd32d54b8d1b6e6486c14c0ebe6',
    language: LanguageType.EN,
  );

  var response = await vk.api.messages.send({
    'user_id': 1,
    'message': 'Test message',
  });

  print(response);
}

Changelog #

1.0.0 #

Initialize package

1.0.1 #

Add Utils methods support

Optimize classes

1.0.2-rc.1 #

Format files throught dartfmt Add example in example/

1.0.2 #

Add Account, Ads methods support

Optimize classes

1.1.0 #

Add 100% coverage of the VK API

Optimize classes

1.2.0 #

Remove useless this.

Remove useless new

Remove useless comments and fix some of them

Add missing types for methods

Convert all params into Map<String, dynamic> for better usability

Some API and VK changes

1.2.1 #

Convert all Future<Map> responses into Future<dynamic> for better usability and for better responses

Add language support

1.2.2 #

Add authorization class

Change export logic

1.3.0 #

Add updates

Add updates.onNewMessage handler

1.3.1 #

Add updates.onEditMessage handler

Add updates.onReplyMessage handler

Add updates.onAllowMessage handler

Add updates.onDenyMessage handler

1.3.2 #

Fix bad жопаs (fix some possible bugs)

Add User Long Poll support (very bad but better than nothing, ye?)

1.3.3 #

Fix Bots Long Poll API handler

example/main.dart

import 'package:vkio/vk.dart';

VK vk = VK(
  token:
      'a35e27fbb06d242fa72551433d2da1607035f6cdba1244cee86a3087bdfd32d54b8d1b6e6486c14c0ebe6',
  version: '5.103',
);

Future<void> main() async {
  var response = await vk.api.groups.getById();

  print(response);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  vkio: ^1.3.3

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:vkio/contexts/context.dart';
import 'package:vkio/contexts/main.dart';
import 'package:vkio/contexts/message-allow.dart';
import 'package:vkio/contexts/message-deny.dart';
import 'package:vkio/contexts/message-edit.dart';
import 'package:vkio/contexts/message-new.dart';
import 'package:vkio/contexts/message-reply.dart';
import 'package:vkio/handlers.dart';
import 'package:vkio/main.dart';
import 'package:vkio/models/account.dart';
import 'package:vkio/models/ads.dart';
import 'package:vkio/models/api.dart';
import 'package:vkio/models/apiexception.dart';
import 'package:vkio/models/apps.dart';
import 'package:vkio/models/auth.dart';
import 'package:vkio/models/authorization.dart';
import 'package:vkio/models/board.dart';
import 'package:vkio/models/database.dart';
import 'package:vkio/models/docs.dart';
import 'package:vkio/models/fave.dart';
import 'package:vkio/models/friends.dart';
import 'package:vkio/models/gifts.dart';
import 'package:vkio/models/groups.dart';
import 'package:vkio/models/leads.dart';
import 'package:vkio/models/likes.dart';
import 'package:vkio/models/market.dart';
import 'package:vkio/models/messages.dart';
import 'package:vkio/models/newsfeed.dart';
import 'package:vkio/models/notes.dart';
import 'package:vkio/models/notifications.dart';
import 'package:vkio/models/orders.dart';
import 'package:vkio/models/pages.dart';
import 'package:vkio/models/photos.dart';
import 'package:vkio/models/polls.dart';
import 'package:vkio/models/prettycards.dart';
import 'package:vkio/models/search.dart';
import 'package:vkio/models/secure.dart';
import 'package:vkio/models/stats.dart';
import 'package:vkio/models/status.dart';
import 'package:vkio/models/storage.dart';
import 'package:vkio/models/stories.dart';
import 'package:vkio/models/streaming.dart';
import 'package:vkio/models/updates.dart';
import 'package:vkio/models/users.dart';
import 'package:vkio/models/utils.dart';
import 'package:vkio/models/video.dart';
import 'package:vkio/models/wall.dart';
import 'package:vkio/models/widgets.dart';
import 'package:vkio/types.dart';
import 'package:vkio/vk.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
53
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
76
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health suggestions

Fix lib/models/updates.dart. (-1.49 points)

Analysis of lib/models/updates.dart reported 3 hints:

line 179 col 7: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

line 183 col 7: Use rethrow to rethrow a caught exception.

line 205 col 9: Future results in async function bodies must be awaited or marked unawaited using package:pedantic.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.2 <3.0.0
html ^0.14.0+2 0.14.0+3
http ^0.12.0+2 0.12.0+4
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
csslib 0.16.1
http_parser 3.1.3
meta 1.1.8
path 1.6.4
pedantic 1.9.0
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6