1
import 'package:vkdart/vkontakte.dart';
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');
10
/// The ID of the creator of the page.
12
int get ownerId => payload['creator_id'];
15
int? get groupId => payload['group_id'];
17
/// The name of the wiki page.
18
String? get title => payload['title'];
20
/// Can a user edit the text of a wiki page
21
bool? get isCanEdit => checkBoolInProperty('current_user_can_edit');
23
/// Can a user change the access rights of a wiki page
24
bool? get isCanEditAccess =>
25
checkBoolInProperty('current_user_can_edit_access');
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'];
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'];
39
/// The date the wiki page was last modified in Unixtime format.
40
int? get edited => payload['edited'];
42
/// The date the wiki page was created in Unixtime format.
43
int? get createdAt => payload['created'];
45
/// The ID of the user who edited the wiki page last.
46
int? get editorId => payload['editor_id'];
48
/// The number of views of the wiki page.
49
int? get viewsCount => payload['views'];
51
/// The title of the parent page for navigation, if any.
52
String? get parent => payload['parent'];
54
/// The title of the second parent page for navigation, if any
55
String? get parent2 => payload['parent2'];
57
/// The text of the page in wiki format, if requested.
58
String? get source => payload['source'];
60
/// The text of the page in html format, if requested.
61
String? get html => payload['html'];
63
/// The address of the page to display the wiki page.
64
String? get viewUrl => payload['view_url'];