-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TODO * ユーザー情報を取得してDBに保存する処理を実装する * Statusクラスは改良の余地があるかも?
- Loading branch information
Showing
8 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
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
10 changes: 10 additions & 0 deletions
10
app/src/main/java/org/ageage/eggplant/common/api/UserService.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.ageage.eggplant.common.api | ||
|
||
import io.reactivex.Single | ||
import org.ageage.eggplant.common.api.response.User | ||
import retrofit2.http.GET | ||
|
||
interface UserService { | ||
@GET("/rest/1/my") | ||
fun userData(): Single<User> | ||
} |
5 changes: 5 additions & 0 deletions
5
app/src/main/java/org/ageage/eggplant/common/api/response/User.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package org.ageage.eggplant.common.api.response | ||
|
||
data class User( | ||
val name: String | ||
) |
13 changes: 13 additions & 0 deletions
13
app/src/main/java/org/ageage/eggplant/common/db/entity/User.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.ageage.eggplant.common.db.entity | ||
|
||
import androidx.room.ColumnInfo | ||
import androidx.room.Entity | ||
import androidx.room.PrimaryKey | ||
|
||
@Entity | ||
data class User( | ||
@PrimaryKey(autoGenerate = true) val id: Int, | ||
@ColumnInfo(name = "name") val name: String, | ||
@ColumnInfo(name = "oauth_token") val oAuthToken: String, | ||
@ColumnInfo(name = "oauth_token_secret") val oAuthTokenSecret: String | ||
) |
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
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