vkdart

Форк
0
65 строк · 2.1 Кб
1
import 'package:vkdart/vkontakte.dart';
2

3
/// Model Wiki Page.
4
///
5
/// See https://dev.vk.com/ru/reference/objects/wiki-page
6
class WikiPageAttachmentModel extends CustomAttachmentModel {
7
  // ignore: public_member_api_docs
8
  WikiPageAttachmentModel(super.payload) : super(attachType: 'page');
9

10
  /// The ID of the creator of the page.
11
  @override
12
  int get ownerId => payload['creator_id'];
13

14
  /// The community ID.
15
  int? get groupId => payload['group_id'];
16

17
  /// The name of the wiki page.
18
  String? get title => payload['title'];
19

20
  /// Can a user edit the text of a wiki page
21
  bool? get isCanEdit => checkBoolInProperty('current_user_can_edit');
22

23
  /// Can a user change the access rights of a wiki page
24
  bool? get isCanEditAccess =>
25
      checkBoolInProperty('current_user_can_edit_access');
26

27
  /// Information about who can view the wiki page:
28
  /// - 2 — everyone can view the page;
29
  /// - 1 — community members only;
30
  /// - 0 — community leaders only.
31
  int? get whoCanView => payload['who_can_view'];
32

33
  /// Specifies who can edit the wiki page:
34
  /// - 2 — everyone can edit the page;
35
  /// - 1 — community members only;
36
  /// - 0 — community leaders only.
37
  int? get whoCanEdit => payload['who_can_edit'];
38

39
  /// The date the wiki page was last modified in Unixtime format.
40
  int? get edited => payload['edited'];
41

42
  /// The date the wiki page was created in Unixtime format.
43
  int? get createdAt => payload['created'];
44

45
  /// The ID of the user who edited the wiki page last.
46
  int? get editorId => payload['editor_id'];
47

48
  /// The number of views of the wiki page.
49
  int? get viewsCount => payload['views'];
50

51
  /// The title of the parent page for navigation, if any.
52
  String? get parent => payload['parent'];
53

54
  /// The title of the second parent page for navigation, if any
55
  String? get parent2 => payload['parent2'];
56

57
  /// The text of the page in wiki format, if requested.
58
  String? get source => payload['source'];
59

60
  /// The text of the page in html format, if requested.
61
  String? get html => payload['html'];
62

63
  /// The address of the page to display the wiki page.
64
  String? get viewUrl => payload['view_url'];
65
}
66

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

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.