Plurk.fromJson constructor
Implementation
Plurk.fromJson(Map<String, dynamic> json) {
ownerId = json['owner_id'];
plurkId = json['plurk_id'];
userId = json['user_id'];
posted = json['posted'];
replurkerId = json['replurker_id'];
qualifier = json['qualifier'];
content = json['content'];
contentRaw = json['content_raw'];
lang = json['lang'];
responseCount = json['response_count'];
responsesSeen = json['responses_seen'];
limitedTo = json['limited_to'];
excluded = json['excluded'];
if (json['no_comments'] != null) {
switch (json['no_comments']) {
case 0:
noComments = Comment.Allow;
break;
case 1:
noComments = Comment.DisableComment;
break;
case 2:
noComments = Comment.FriendsOnly;
break;
}
}
plurkType = json['plurk_type'];
isUnread = json['is_unread'];
lastEdited = json['last_edited'];
porn = json['porn'];
publishToFollowers = json['publish_to_followers'];
coins = json['coins'];
hasGift = json['has_gift'];
if (json['favorers'] != null) {
favorers = [];
json['favorers'].forEach((v) {
favorers!.add(v);
});
}
favoriteCount = json['favorite_count'];
replurked = json['replurked'];
if (json['replurkers'] != null) {
replurkers = [];
json['replurkers'].forEach((v) {
replurkers!.add(v);
});
}
replurkersCount = json['replurkers_count'];
replurkable = json['replurkable'];
anonymous = json['anonymous'];
responded = json['responded'];
mentioned = json['mentioned'];
favorite = json['favorite'];
bookmark = (json['bookmark'] == null) ? (false) : (json['bookmark']);
qualifierTranslated = json['qualifier_translated'];
if (json['owner'] != null) {
owner = User.fromJson(json['owner']);
}
errorText = json['error_text'];
successText = json['success_text'];
}