mirror of
https://github.com/tommyxchow/frosty.git
synced 2025-08-06 08:51:29 +08:00
121 lines
3.2 KiB
Dart
121 lines
3.2 KiB
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'emotes.g.dart';
|
|
|
|
// Twitch Emotes
|
|
@JsonSerializable(createToJson: false, fieldRename: FieldRename.snake)
|
|
class ImagesTwitch {
|
|
final String url1x;
|
|
final String url2x;
|
|
final String url4x;
|
|
|
|
const ImagesTwitch(this.url1x, this.url2x, this.url4x);
|
|
|
|
factory ImagesTwitch.fromJson(Map<String, dynamic> json) => _$ImagesTwitchFromJson(json);
|
|
}
|
|
|
|
@JsonSerializable(createToJson: false, fieldRename: FieldRename.snake)
|
|
class EmoteTwitch {
|
|
final String id;
|
|
final String name;
|
|
final ImagesTwitch images;
|
|
final String? tier;
|
|
final String? emoteType;
|
|
final String? emoteSetId;
|
|
final List<String> format;
|
|
final List<String> scale;
|
|
final List<String> themeMode;
|
|
|
|
const EmoteTwitch(this.id, this.name, this.images, this.tier, this.emoteType, this.emoteSetId, this.format, this.scale, this.themeMode);
|
|
|
|
factory EmoteTwitch.fromJson(Map<String, dynamic> json) => _$EmoteTwitchFromJson(json);
|
|
}
|
|
|
|
// BTTV Emotes
|
|
@JsonSerializable(createToJson: false)
|
|
class EmoteBTTVGlobal {
|
|
final String id;
|
|
final String code;
|
|
final String imageType;
|
|
final String userId;
|
|
|
|
const EmoteBTTVGlobal(this.id, this.code, this.imageType, this.userId);
|
|
|
|
factory EmoteBTTVGlobal.fromJson(Map<String, dynamic> json) => _$EmoteBTTVGlobalFromJson(json);
|
|
}
|
|
|
|
@JsonSerializable(createToJson: false)
|
|
class UserBTTV {
|
|
final String id;
|
|
final String name;
|
|
final String displayName;
|
|
final String providerId;
|
|
|
|
const UserBTTV(this.id, this.name, this.displayName, this.providerId);
|
|
|
|
factory UserBTTV.fromJson(Map<String, dynamic> json) => _$UserBTTVFromJson(json);
|
|
}
|
|
|
|
@JsonSerializable(createToJson: false)
|
|
class EmoteBTTVShared {
|
|
final String id;
|
|
final String code;
|
|
final String imageType;
|
|
final UserBTTV user;
|
|
|
|
const EmoteBTTVShared(this.id, this.code, this.imageType, this.user);
|
|
|
|
factory EmoteBTTVShared.fromJson(Map<String, dynamic> json) => _$EmoteBTTVSharedFromJson(json);
|
|
}
|
|
|
|
@JsonSerializable(createToJson: false)
|
|
class EmoteBTTVChannel {
|
|
final String id;
|
|
final List<String> bots;
|
|
final List<EmoteBTTVGlobal> channelEmotes;
|
|
final List<EmoteBTTVShared> sharedEmotes;
|
|
|
|
const EmoteBTTVChannel(this.id, this.bots, this.channelEmotes, this.sharedEmotes);
|
|
|
|
factory EmoteBTTVChannel.fromJson(Map<String, dynamic> json) => _$EmoteBTTVChannelFromJson(json);
|
|
}
|
|
|
|
// FFZ Emotes
|
|
@JsonSerializable(createToJson: false)
|
|
class UserFFZ {
|
|
final int id;
|
|
final String name;
|
|
final String displayName;
|
|
|
|
const UserFFZ(this.id, this.name, this.displayName);
|
|
|
|
factory UserFFZ.fromJson(Map<String, dynamic> json) => _$UserFFZFromJson(json);
|
|
}
|
|
|
|
@JsonSerializable(createToJson: false)
|
|
class ImagesFFZ {
|
|
@JsonKey(name: '1x')
|
|
final String url1x;
|
|
@JsonKey(name: '2x')
|
|
final String? url2x;
|
|
@JsonKey(name: '4x')
|
|
final String? url4x;
|
|
|
|
const ImagesFFZ(this.url1x, this.url2x, this.url4x);
|
|
|
|
factory ImagesFFZ.fromJson(Map<String, dynamic> json) => _$ImagesFFZFromJson(json);
|
|
}
|
|
|
|
@JsonSerializable(createToJson: false)
|
|
class EmoteFFZ {
|
|
final int id;
|
|
final UserFFZ user;
|
|
final String code;
|
|
final ImagesFFZ images;
|
|
final String imageType;
|
|
|
|
const EmoteFFZ(this.id, this.user, this.code, this.images, this.imageType);
|
|
|
|
factory EmoteFFZ.fromJson(Map<String, dynamic> json) => _$EmoteFFZFromJson(json);
|
|
}
|