mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-22 01:56:47 +08:00
@@ -15,19 +15,19 @@ class CardData {
|
||||
});
|
||||
|
||||
factory CardData.fromJson(Map<String, dynamic> json) => CardData(
|
||||
bannerV2: json['banner_v2'] == null
|
||||
? null
|
||||
: CardDataItem.fromJson(json['banner_v2'] as Map<String, dynamic>),
|
||||
myIdolV1: json['my_idol_v1'] == null
|
||||
? null
|
||||
: CardDataItem.fromJson(json['my_idol_v1'] as Map<String, dynamic>),
|
||||
areaEntranceV3: json['area_entrance_v3'] == null
|
||||
? null
|
||||
: CardDataItem.fromJson(
|
||||
json['area_entrance_v3'] as Map<String, dynamic>),
|
||||
smallCardV1: json['small_card_v1'] == null
|
||||
? null
|
||||
: CardLiveItem.fromJson(
|
||||
json['small_card_v1'] as Map<String, dynamic>),
|
||||
);
|
||||
bannerV2: json['banner_v2'] == null
|
||||
? null
|
||||
: CardDataItem.fromJson(json['banner_v2'] as Map<String, dynamic>),
|
||||
myIdolV1: json['my_idol_v1'] == null
|
||||
? null
|
||||
: CardDataItem.fromJson(json['my_idol_v1'] as Map<String, dynamic>),
|
||||
areaEntranceV3: json['area_entrance_v3'] == null
|
||||
? null
|
||||
: CardDataItem.fromJson(
|
||||
json['area_entrance_v3'] as Map<String, dynamic>,
|
||||
),
|
||||
smallCardV1: json['small_card_v1'] == null
|
||||
? null
|
||||
: CardLiveItem.fromJson(json['small_card_v1'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -15,17 +15,17 @@ class CardDataItem {
|
||||
});
|
||||
|
||||
factory CardDataItem.fromJson(Map<String, dynamic> json) => CardDataItem(
|
||||
moduleInfo: json['module_info'] == null
|
||||
? null
|
||||
: ModuleInfo.fromJson(json['module_info'] as Map<String, dynamic>),
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => CardLiveItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
topView: json['top_view'] as dynamic,
|
||||
extraInfo: json['extra_info'] == null
|
||||
? null
|
||||
: ExtraInfo.fromJson(json['extra_info'] as Map<String, dynamic>),
|
||||
);
|
||||
moduleInfo: json['module_info'] == null
|
||||
? null
|
||||
: ModuleInfo.fromJson(json['module_info'] as Map<String, dynamic>),
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => CardLiveItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
topView: json['top_view'] as dynamic,
|
||||
extraInfo: json['extra_info'] == null
|
||||
? null
|
||||
: ExtraInfo.fromJson(json['extra_info'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
|
||||
class ExtraInfo {
|
||||
|
||||
@@ -48,29 +48,28 @@ class CardLiveItem {
|
||||
});
|
||||
|
||||
factory CardLiveItem.fromJson(Map<String, dynamic> json) => CardLiveItem(
|
||||
roomid: json['roomid'] ?? json['id'],
|
||||
uid: json['uid'] as int?,
|
||||
uname: json['uname'] as String?,
|
||||
face: json['face'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
title: json['title'] as String?,
|
||||
area: json['area'] as int?,
|
||||
liveTime: json['live_time'] as int?,
|
||||
areaName: json['area_name'] as String?,
|
||||
areaV2Id: json['area_v2_id'] as int?,
|
||||
areaV2Name: json['area_v2_name'] as String?,
|
||||
areaV2ParentName: json['area_v2_parent_name'] as String?,
|
||||
areaV2ParentId: json['area_v2_parent_id'] as int?,
|
||||
liveTagName: json['live_tag_name'] as String?,
|
||||
online: json['online'] as int?,
|
||||
link: json['link'] as String?,
|
||||
officialVerify: json['official_verify'] as int?,
|
||||
currentQn: json['current_qn'] as int?,
|
||||
watchedShow: json['watched_show'] == null
|
||||
? null
|
||||
: WatchedShow.fromJson(
|
||||
json['watched_show'] as Map<String, dynamic>),
|
||||
statusText: json['status_text'] as String?,
|
||||
tagType: json['tag_type'],
|
||||
);
|
||||
roomid: json['roomid'] ?? json['id'],
|
||||
uid: json['uid'] as int?,
|
||||
uname: json['uname'] as String?,
|
||||
face: json['face'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
title: json['title'] as String?,
|
||||
area: json['area'] as int?,
|
||||
liveTime: json['live_time'] as int?,
|
||||
areaName: json['area_name'] as String?,
|
||||
areaV2Id: json['area_v2_id'] as int?,
|
||||
areaV2Name: json['area_v2_name'] as String?,
|
||||
areaV2ParentName: json['area_v2_parent_name'] as String?,
|
||||
areaV2ParentId: json['area_v2_parent_id'] as int?,
|
||||
liveTagName: json['live_tag_name'] as String?,
|
||||
online: json['online'] as int?,
|
||||
link: json['link'] as String?,
|
||||
officialVerify: json['official_verify'] as int?,
|
||||
currentQn: json['current_qn'] as int?,
|
||||
watchedShow: json['watched_show'] == null
|
||||
? null
|
||||
: WatchedShow.fromJson(json['watched_show'] as Map<String, dynamic>),
|
||||
statusText: json['status_text'] as String?,
|
||||
tagType: json['tag_type'],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ class LiveCardList {
|
||||
LiveCardList({this.cardType, this.cardData});
|
||||
|
||||
factory LiveCardList.fromJson(Map<String, dynamic> json) => LiveCardList(
|
||||
cardType: json['card_type'] as String?,
|
||||
cardData: json['card_data'] == null
|
||||
? null
|
||||
: CardData.fromJson(json['card_data'] as Map<String, dynamic>),
|
||||
);
|
||||
cardType: json['card_type'] as String?,
|
||||
cardData: json['card_data'] == null
|
||||
? null
|
||||
: CardData.fromJson(json['card_data'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@ class LiveFeedIndex {
|
||||
LiveFeedIndex({this.code, this.message, this.ttl, this.data});
|
||||
|
||||
factory LiveFeedIndex.fromJson(Map<String, dynamic> json) => LiveFeedIndex(
|
||||
code: json['code'] as int?,
|
||||
message: json['message'] as String?,
|
||||
ttl: json['ttl'] as int?,
|
||||
data: json['data'] == null
|
||||
? null
|
||||
: LiveIndexData.fromJson(json['data'] as Map<String, dynamic>),
|
||||
);
|
||||
code: json['code'] as int?,
|
||||
message: json['message'] as String?,
|
||||
ttl: json['ttl'] as int?,
|
||||
data: json['data'] == null
|
||||
? null
|
||||
: LiveIndexData.fromJson(json['data'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -18,12 +18,12 @@ class ModuleInfo {
|
||||
});
|
||||
|
||||
factory ModuleInfo.fromJson(Map<String, dynamic> json) => ModuleInfo(
|
||||
id: json['id'] as int?,
|
||||
link: json['link'] as String?,
|
||||
pic: json['pic'] as String?,
|
||||
title: json['title'] as String?,
|
||||
type: json['type'] as int?,
|
||||
sort: json['sort'] as int?,
|
||||
count: json['count'] as int?,
|
||||
);
|
||||
id: json['id'] as int?,
|
||||
link: json['link'] as String?,
|
||||
pic: json['pic'] as String?,
|
||||
title: json['title'] as String?,
|
||||
type: json['type'] as int?,
|
||||
sort: json['sort'] as int?,
|
||||
count: json['count'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ class WatchedShow {
|
||||
});
|
||||
|
||||
factory WatchedShow.fromJson(Map<String, dynamic> json) => WatchedShow(
|
||||
textSmall: json['text_small'] as String?,
|
||||
textLarge: json['text_large'] as String?,
|
||||
);
|
||||
textSmall: json['text_small'] as String?,
|
||||
textLarge: json['text_large'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user