-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add pull request template * [feat] 검색, 요일별 리스트에 사용할 api response 추가
- Loading branch information
1 parent
b58ab5e
commit b2cfd5e
Showing
21 changed files
with
221 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# PULL REQUEST | ||
|
||
## Description | ||
|
||
|
||
## ScreenShots | ||
<p> | ||
<img src="", width="300" /> | ||
</p> | ||
|
||
## Reference | ||
- |
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
2 changes: 1 addition & 1 deletion
2
...lin/kr/tooni/tooni/extensions/Activity.kt → ...r/tooni/tooni/core/extensions/Activity.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
2 changes: 1 addition & 1 deletion
2
...tlin/kr/tooni/tooni/extensions/Context.kt → ...kr/tooni/tooni/core/extensions/Context.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
2 changes: 1 addition & 1 deletion
2
...lin/kr/tooni/tooni/extensions/Fragment.kt → ...r/tooni/tooni/core/extensions/Fragment.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
2 changes: 1 addition & 1 deletion
2
...kotlin/kr/tooni/tooni/extensions/Glide.kt → ...n/kr/tooni/tooni/core/extensions/Glide.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
2 changes: 1 addition & 1 deletion
2
...in/kr/tooni/tooni/extensions/ImageView.kt → .../tooni/tooni/core/extensions/ImageView.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
2 changes: 1 addition & 1 deletion
2
...in/kr/tooni/tooni/extensions/Primitive.kt → .../tooni/tooni/core/extensions/Primitive.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
2 changes: 1 addition & 1 deletion
2
...kr/tooni/tooni/extensions/RecyclerView.kt → ...oni/tooni/core/extensions/RecyclerView.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
2 changes: 1 addition & 1 deletion
2
...kotlin/kr/tooni/tooni/extensions/Toast.kt → ...n/kr/tooni/tooni/core/extensions/Toast.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Created by Leo on 2021. 05. 19 .. | ||
*/ | ||
package kr.tooni.tooni.core.model | ||
|
||
data class Author( | ||
val id: Long, | ||
val name: String, | ||
) { | ||
|
||
companion object { | ||
|
||
val EMPTY = Author( | ||
id = 0, | ||
name = "" | ||
) | ||
} | ||
} |
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,29 @@ | ||
/* | ||
* Created by Leo on 2021. 05. 19 .. | ||
*/ | ||
package kr.tooni.tooni.core.model | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class Site( | ||
val site: Type?, | ||
val thumbnail: String? | ||
) { | ||
|
||
enum class Type { | ||
@SerializedName("NAVER") | ||
NAVER, | ||
@SerializedName("DAUM") | ||
DAUM, | ||
@SerializedName("NONE") | ||
NONE | ||
} | ||
|
||
companion object { | ||
|
||
val EMPTY = Site( | ||
site = Type.NONE, | ||
thumbnail = null | ||
) | ||
} | ||
} |
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,27 @@ | ||
/* | ||
* Created by Leo on 2021. 05. 19 .. | ||
*/ | ||
package kr.tooni.tooni.core.model | ||
|
||
data class Webtoon( | ||
val id: Long, | ||
val authors: List<Author>, | ||
val site: Site, | ||
val thumbnail: String, | ||
val title: String | ||
) { | ||
|
||
companion object { | ||
|
||
val EMPTY = Webtoon( | ||
id = 0, | ||
authors = listOf(), | ||
site = Site( | ||
site = null, | ||
thumbnail = null | ||
), | ||
thumbnail = "", | ||
title = "" | ||
) | ||
} | ||
} |
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,14 @@ | ||
/* | ||
* Created by Leo on 2021. 05. 19 .. | ||
*/ | ||
package kr.tooni.tooni.core.model | ||
|
||
enum class WeekDay(val value: String) { | ||
MON("mon"), | ||
TUE("thu"), | ||
WED("wed"), | ||
THU("thu"), | ||
FRI("fri"), | ||
SAT("sat"), | ||
SUN("sun") | ||
} |
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,24 @@ | ||
/* | ||
* Created by Leo on 2021. 05. 19 .. | ||
*/ | ||
package kr.tooni.tooni.data.api | ||
|
||
import io.reactivex.rxjava3.core.Single | ||
import kr.tooni.tooni.data.response.WebtoonSearchResponse | ||
import kr.tooni.tooni.data.response.WebtoonWeekDayResponse | ||
import retrofit2.http.GET | ||
import retrofit2.http.Path | ||
import retrofit2.http.Query | ||
|
||
interface ListApi : Api { | ||
|
||
@GET("search") | ||
fun search( | ||
@Query("query") query: String | ||
): Single<WebtoonSearchResponse> | ||
|
||
@GET("weekday/{weekday}") | ||
fun getWebtoonsByDay( | ||
@Path("weekday") weekday: String | ||
): Single<WebtoonWeekDayResponse> | ||
} |
22 changes: 22 additions & 0 deletions
22
app/src/main/kotlin/kr/tooni/tooni/data/response/BaseResponse.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,22 @@ | ||
/* | ||
* Created by Leo on 2021. 05. 19 .. | ||
*/ | ||
package kr.tooni.tooni.data.response | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
abstract class BaseResponse { | ||
val status: Status? = null | ||
val message: String? = null | ||
|
||
enum class Status { | ||
@SerializedName("OK") | ||
OK, | ||
|
||
@SerializedName("CLIENT_ERROR") | ||
CLIENT_ERROR, | ||
|
||
@SerializedName("SERVER_ERROR") | ||
SERVER_ERROR | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
app/src/main/kotlin/kr/tooni/tooni/data/response/WebtoonSearchResponse.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,16 @@ | ||
/* | ||
* Created by Leo on 2021. 05. 19 .. | ||
*/ | ||
package kr.tooni.tooni.data.response | ||
|
||
import kr.tooni.tooni.core.model.Webtoon | ||
|
||
data class WebtoonSearchResponse( | ||
val data: WebtoonSearch? | ||
) : BaseResponse() { | ||
|
||
data class WebtoonSearch( | ||
val query: String, | ||
val webtoons: List<Webtoon> | ||
) | ||
} |
17 changes: 17 additions & 0 deletions
17
app/src/main/kotlin/kr/tooni/tooni/data/response/WebtoonWeekDayResponse.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,17 @@ | ||
/* | ||
* Created by Leo on 2021. 05. 19 .. | ||
*/ | ||
package kr.tooni.tooni.data.response | ||
|
||
import kr.tooni.tooni.core.model.Site | ||
import kr.tooni.tooni.core.model.Webtoon | ||
|
||
data class WebtoonWeekDayResponse( | ||
val data: WebtoonWeekDay | ||
) : BaseResponse() { | ||
|
||
data class WebtoonWeekDay( | ||
val sites: List<Site>, | ||
val webtoons: List<Webtoon> | ||
) | ||
} |
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