shlink-manager/lib/API/Classes/ShortURL/device_long_urls.dart

24 lines
695 B
Dart
Raw Normal View History

2024-01-27 23:07:06 +01:00
/// Data about device-specific long URLs for one short URL
class DeviceLongUrls {
/// Custom URL for Android devices
final String? android;
2024-01-28 00:32:09 +01:00
2024-01-27 23:07:06 +01:00
/// Custom URL for iOS devices
final String? ios;
2024-01-28 00:32:09 +01:00
2024-01-27 23:07:06 +01:00
/// Custom URL for desktop
final String? desktop;
DeviceLongUrls(this.android, this.ios, this.desktop);
/// Converts JSON data from the API to an instance of [DeviceLongUrls]
DeviceLongUrls.fromJson(Map<String, dynamic> json)
2024-01-28 00:32:09 +01:00
: android = json["android"],
ios = json["ios"],
desktop = json["desktop"];
2024-01-27 23:07:06 +01:00
/// Converts data from this class to an JSON object of type
2024-01-28 00:32:09 +01:00
Map<String, dynamic> toJson() =>
{"android": android, "ios": ios, "desktop": desktop};
}