Refine schedule/todo UI and integrate Google Photos API
This commit is contained in:
@@ -76,4 +76,22 @@ class PhotoService {
|
||||
}
|
||||
await _client.delete("${ApiConfig.photos}/$id");
|
||||
}
|
||||
|
||||
Future<String> getGoogleAuthUrl() async {
|
||||
final data = await _client.get("${ApiConfig.photos}/auth/url");
|
||||
return data["url"] as String;
|
||||
}
|
||||
|
||||
Future<bool> getGoogleStatus() async {
|
||||
try {
|
||||
final data = await _client.get("${ApiConfig.photos}/status");
|
||||
return data["connected"] as bool? ?? false;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> disconnectGoogle() async {
|
||||
await _client.get("${ApiConfig.photos}/disconnect");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user