2022-02-03 09:06:44 -07:00
|
|
|
import 'package:dio/dio.dart';
|
2022-03-10 15:09:03 -07:00
|
|
|
import 'package:immich_mobile/shared/models/mapbox_info.model.dart';
|
2022-02-03 09:06:44 -07:00
|
|
|
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());
|
|
|
|
}
|
2022-03-10 15:09:03 -07:00
|
|
|
|
|
|
|
Future<MapboxInfo> getMapboxInfo() async {
|
|
|
|
Response response = await _networkService.getRequest(url: 'server-info/mapbox');
|
|
|
|
|
|
|
|
return MapboxInfo.fromJson(response.toString());
|
|
|
|
}
|
2022-02-03 09:06:44 -07:00
|
|
|
}
|