Skip to content

Commit

Permalink
[bbb-72] ๐Ÿ› ๏ธRefactor: NAVER Open API ํ˜ธ์ถœ์— ์‚ฌ์šฉ๋˜๋Š” ๊ฒ€์ƒ‰ ์˜ต์…˜ Enum ๋ช…์นญ ๋ช…ํ™•ํ•˜๊ฒŒ ์„ค์ •
Browse files Browse the repository at this point in the history
๊ฒ€์ƒ‰ ์˜ต์…˜๋“ค์ด ์—ด๊ฑฐ๋œ Enum์˜ ๋ช…์นญ๋งŒ์œผ๋กœ ์˜๋ฏธ๋ฅผ ํŒŒ์•…ํ•  ์ˆ˜ ์žˆ๋„๋ก ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ดํ›„ ์‹ค์ œ Open API๋ฅผ ํ˜ธ์ถœํ•  ๋•Œ, ํ•ด๋‹น enum์˜ value ๊ฐ’์ด ์ „๋‹ฌ๋  ์ˆ˜ ์žˆ๋„๋ก ๊ตฌ์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค.
  • Loading branch information
platinouss committed Jul 1, 2024
1 parent 9353432 commit 0226094
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ public record NaverBookApiQuery(
) {

public NaverBookApiQuery(String query) {
this(query, 10, 1, SortType.SIM);
this(query, 10, 1, SortType.SIMILARITY);
}
}
17 changes: 15 additions & 2 deletions src/main/java/com/bombombom/devs/client/naver/enums/SortType.java
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;
}
}

0 comments on commit 0226094

Please sign in to comment.