From b39fc6ddb990a5748bbee77ea873ea57fc33aede Mon Sep 17 00:00:00 2001 From: KP9lKk Date: Tue, 11 Mar 2025 11:39:14 +0300 Subject: [PATCH] add data --- .idea/gradle.xml | 1 + .idea/misc.xml | 1 - .../networksample/data/local/AuthLocalStore.kt | 9 +++++++++ .../data/local/datastore/LocalDataStore.kt | 16 ++++++++++++++++ .../User.kt => model/RegistrationRequest.kt} | 4 ++-- .../networksample/data/model/SaveTokenRequest.kt | 3 +++ .../networksample/data/model/TokenResponse.kt | 3 +++ .../example/networksample/data/remote/Auth.kt | 11 ----------- .../data/remote/AuthRemoteSource.kt | 8 ++++++++ .../networksample/data/remote/retrofit/Auth.kt | 12 ++++++++++++ .../data/remote/{ => retrofit}/RetrofitClient.kt | 4 ++-- .../data/repository/AuthRepository.kt | 6 ++++++ .../data/repository/AuthRepositoryImpl.kt | 16 ++++++++++++++++ .../networksample/screen/RegistrationScreen.kt | 7 +++---- 14 files changed, 81 insertions(+), 20 deletions(-) create mode 100644 app/src/main/java/com/example/networksample/data/local/AuthLocalStore.kt create mode 100644 app/src/main/java/com/example/networksample/data/local/datastore/LocalDataStore.kt rename app/src/main/java/com/example/networksample/data/{remote/User.kt => model/RegistrationRequest.kt} (50%) create mode 100644 app/src/main/java/com/example/networksample/data/model/SaveTokenRequest.kt create mode 100644 app/src/main/java/com/example/networksample/data/model/TokenResponse.kt delete mode 100644 app/src/main/java/com/example/networksample/data/remote/Auth.kt create mode 100644 app/src/main/java/com/example/networksample/data/remote/AuthRemoteSource.kt create mode 100644 app/src/main/java/com/example/networksample/data/remote/retrofit/Auth.kt rename app/src/main/java/com/example/networksample/data/remote/{ => retrofit}/RetrofitClient.kt (76%) create mode 100644 app/src/main/java/com/example/networksample/data/repository/AuthRepository.kt create mode 100644 app/src/main/java/com/example/networksample/data/repository/AuthRepositoryImpl.kt diff --git a/.idea/gradle.xml b/.idea/gradle.xml index ae733f1..7b3006b 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -1,5 +1,6 @@ +