-
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.
[bbb-72] ๐ ๏ธRefactor: NAVER Open API ํธ์ถ์ ์ฌ์ฉ๋๋ ๊ฒ์ ์ต์
Enum ๋ช
์นญ ๋ช
ํํ๊ฒ ์ค์
๊ฒ์ ์ต์ ๋ค์ด ์ด๊ฑฐ๋ Enum์ ๋ช ์นญ๋ง์ผ๋ก ์๋ฏธ๋ฅผ ํ์ ํ ์ ์๋๋ก ์์ ํ์ต๋๋ค. ์ดํ ์ค์ Open API๋ฅผ ํธ์ถํ ๋, ํด๋น enum์ value ๊ฐ์ด ์ ๋ฌ๋ ์ ์๋๋ก ๊ตฌ์ฑํ์ต๋๋ค.
- Loading branch information
1 parent
9353432
commit 0226094
Showing
2 changed files
with
16 additions
and
3 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
17 changes: 15 additions & 2 deletions
17
src/main/java/com/bombombom/devs/client/naver/enums/SortType.java
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,6 +1,19 @@ | ||
package com.bombombom.devs.client.naver.enums; | ||
|
||
import com.fasterxml.jackson.annotation.JsonValue; | ||
|
||
public enum SortType { | ||
SIM, | ||
DATE | ||
SIMILARITY("sim"), | ||
RECENTLY_PUBLISHED("date"); | ||
|
||
public final String value; | ||
|
||
SortType(String value) { | ||
this.value = value; | ||
} | ||
|
||
@JsonValue | ||
public String getValue() { | ||
return value; | ||
} | ||
} |