This repository was archived by the owner on Jul 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from shirosweets/m3_refactor_good_practices
M3 refactor good practices
- Loading branch information
Showing
34 changed files
with
471 additions
and
601 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,21 @@ | ||
package com.example.myapplication | ||
|
||
import okhttp3.ResponseBody | ||
import retrofit2.Call | ||
import retrofit2.Response | ||
import retrofit2.http.* | ||
import retrofit2.http.PUT | ||
|
||
|
||
|
||
|
||
interface APIService { | ||
|
||
@GET | ||
suspend fun getProducts(@Url url:String): Response<List<DataProduct>> | ||
suspend fun getProducts(@Url url: String): Response<List<DataProduct>> | ||
|
||
@GET | ||
suspend fun getUserData(@Url url:String):Response<User> | ||
suspend fun getUserData(@Url url: String): Response<User> | ||
|
||
@FormUrlEncoded | ||
@POST("api/login") | ||
suspend fun loginUser(@Field("email") email:String, | ||
@Field("password")password:String):Response<ResponseBody> | ||
suspend fun loginUser( | ||
@Field("email") email: String, | ||
@Field("password") password: String | ||
): Response<ResponseBody> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 12 additions & 3 deletions
15
...a/com/example/myapplication/UserConfig.kt → ...om/example/myapplication/ConfigManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.