-
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.
Feat: implement external api handlers (#66)
만드신 구현체 기준으로 타입마다 사용될 구현체들을 더 선언했습니다.
- Loading branch information
Showing
5 changed files
with
74 additions
and
1 deletion.
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
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
24 changes: 24 additions & 0 deletions
24
src/main/java/beforespring/socialfeed/content/service/InstagramApiHandler.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package beforespring.socialfeed.content.service; | ||
|
||
import beforespring.socialfeed.content.domain.ContentSourceType; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
@Slf4j | ||
public class InstagramApiHandler implements ExternalApiHandler { | ||
@Override | ||
public ContentSourceType getSourceType() { | ||
return ContentSourceType.INSTAGRAM; | ||
} | ||
|
||
@Override | ||
public void like(String contentSourceId) { | ||
log.info("Instagram like contentSourceId: {}", contentSourceId); | ||
} | ||
|
||
@Override | ||
public void share(String contentSourceId) { | ||
log.info("Instagram share contentSourceId: {}", contentSourceId); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/beforespring/socialfeed/content/service/ThreadsApiHandler.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package beforespring.socialfeed.content.service; | ||
|
||
import beforespring.socialfeed.content.domain.ContentSourceType; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
@Slf4j | ||
public class ThreadsApiHandler implements ExternalApiHandler { | ||
@Override | ||
public ContentSourceType getSourceType() { | ||
return ContentSourceType.THREADS; | ||
} | ||
|
||
@Override | ||
public void like(String contentSourceId) { | ||
log.info("Threads like contentSourceId: {}", contentSourceId); | ||
} | ||
|
||
@Override | ||
public void share(String contentSourceId) { | ||
log.info("Threads share contentSourceId: {}", contentSourceId); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/beforespring/socialfeed/content/service/TwitterApiHandler.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package beforespring.socialfeed.content.service; | ||
|
||
import beforespring.socialfeed.content.domain.ContentSourceType; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
@Slf4j | ||
public class TwitterApiHandler implements ExternalApiHandler { | ||
@Override | ||
public ContentSourceType getSourceType() { | ||
return ContentSourceType.TWITTER; | ||
} | ||
|
||
@Override | ||
public void like(String contentSourceId) { | ||
log.info("Twitter like contentSourceId: {}", contentSourceId); | ||
} | ||
|
||
@Override | ||
public void share(String contentSourceId) { | ||
log.info("Twitter share contentSourceId: {}", contentSourceId); | ||
} | ||
} |