13 lines
296 B
Dart
13 lines
296 B
Dart
|
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;
|
||
|
}
|