OpenMediacenterMobileFlutter/lib/api/video_api.dart

13 lines
296 B
Dart
Raw Normal View History

2022-08-30 21:25:21 +00:00
import 'dart:convert';
import '../types/video_data.dart';
import 'api.dart';
Future<VideoData> loadVideoData(int videoId) async {
final data = await API.query("video", "loadVideo", {'MovieId': videoId});
final d = jsonDecode(data);
final video = VideoData.fromJson(d);
return video;
}