mirror of
https://github.com/immich-app/immich.git
synced 2024-12-16 12:20:08 +02:00
e407a4fa13
* Renamed multipart filed name 'files' to 'assetData'. * Added an additional field name of 'thumbnailData' to multipart form. * Implemented upload mechanism for thumbnail directly from the mobile client. * Removed dead code * Implemented a version checking mechanism.
28 lines
969 B
Dart
28 lines
969 B
Dart
import 'package:dio/dio.dart';
|
|
import 'package:immich_mobile/shared/models/mapbox_info.model.dart';
|
|
import 'package:immich_mobile/shared/models/server_version.model.dart';
|
|
import 'package:immich_mobile/shared/services/network.service.dart';
|
|
import 'package:immich_mobile/shared/models/server_info.model.dart';
|
|
|
|
class ServerInfoService {
|
|
final NetworkService _networkService = NetworkService();
|
|
|
|
Future<ServerInfo> getServerInfo() async {
|
|
Response response = await _networkService.getRequest(url: 'server-info');
|
|
|
|
return ServerInfo.fromJson(response.toString());
|
|
}
|
|
|
|
Future<MapboxInfo> getMapboxInfo() async {
|
|
Response response = await _networkService.getRequest(url: 'server-info/mapbox');
|
|
|
|
return MapboxInfo.fromJson(response.toString());
|
|
}
|
|
|
|
Future<ServerVersion?> getServerVersion() async {
|
|
Response response = await _networkService.getRequest(url: 'server-info/version');
|
|
|
|
return ServerVersion.fromJson(response.toString());
|
|
}
|
|
}
|