Package com.bytedesk.social.instagram
Class InstagramPrivateRepliesController
java.lang.Object
com.bytedesk.social.instagram.InstagramPrivateRepliesController
@RestController
@RequestMapping("/api/instagram/private-replies")
public class InstagramPrivateRepliesController
extends Object
Instagram私密回复控制器
提供REST API接口用于发送私密回复和管理相关功能
https://developers.facebook.com/docs/messenger-platform/instagram/features/private-replies
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckMediaTypeSupport
(String mediaType) 检查媒体类型是否支持私密回复clearCache
(String commentId) 清除发送缓存获取缓存统计信息org.springframework.http.ResponseEntity<InstagramPrivateRepliesService.CommentData>
getCommentInfo
(String commentId) 获取评论信息org.springframework.http.ResponseEntity<InstagramMessageResponse>
处理评论webhook事件org.springframework.http.ResponseEntity<InstagramMessageResponse>
发送私密回复org.springframework.http.ResponseEntity<InstagramMessageResponse>
sendPrivateReplyWithValidation
(InstagramPrivateRepliesController.PrivateReplyWithValidationRequest request) 发送私密回复(带时间验证)验证回复时间是否有效
-
Field Details
-
instagramPrivateRepliesService
-
-
Constructor Details
-
InstagramPrivateRepliesController
public InstagramPrivateRepliesController()
-
-
Method Details
-
sendPrivateReply
@PostMapping("/send") public org.springframework.http.ResponseEntity<InstagramMessageResponse> sendPrivateReply(@RequestBody InstagramPrivateRepliesController.PrivateReplyRequest request) 发送私密回复- Parameters:
request
- 包含commentId和message的请求- Returns:
- 发送结果
-
sendPrivateReplyWithValidation
@PostMapping("/send-with-validation") public org.springframework.http.ResponseEntity<InstagramMessageResponse> sendPrivateReplyWithValidation(@RequestBody InstagramPrivateRepliesController.PrivateReplyWithValidationRequest request) 发送私密回复(带时间验证)- Parameters:
request
- 包含commentId、message、createdTime和isLiveComment的请求- Returns:
- 发送结果
-
handleCommentWebhook
@PostMapping("/handle-webhook") public org.springframework.http.ResponseEntity<InstagramMessageResponse> handleCommentWebhook(@RequestBody InstagramPrivateRepliesController.CommentWebhookRequest request) 处理评论webhook事件- Parameters:
request
- 包含评论数据和自动回复消息的请求- Returns:
- 处理结果
-
getCommentInfo
@GetMapping("/comment/{commentId}") public org.springframework.http.ResponseEntity<InstagramPrivateRepliesService.CommentData> getCommentInfo(@PathVariable String commentId) 获取评论信息- Parameters:
commentId
- 评论ID- Returns:
- 评论信息
-
validateReplyTime
@PostMapping("/validate-time") public org.springframework.http.ResponseEntity<Map<String,Object>> validateReplyTime(@RequestBody InstagramPrivateRepliesController.TimeValidationRequest request) 验证回复时间是否有效- Parameters:
request
- 包含createdTime和isLiveComment的请求- Returns:
- 验证结果
-
checkMediaTypeSupport
@GetMapping("/check-support/{mediaType}") public org.springframework.http.ResponseEntity<Map<String,Object>> checkMediaTypeSupport(@PathVariable String mediaType) 检查媒体类型是否支持私密回复- Parameters:
mediaType
- 媒体类型- Returns:
- 检查结果
-
clearCache
@DeleteMapping("/cache") public org.springframework.http.ResponseEntity<Map<String,Object>> clearCache(@RequestParam(required=false) String commentId) 清除发送缓存- Parameters:
commentId
- 评论ID(可选)- Returns:
- 操作结果
-
getCacheStats
@GetMapping("/cache/stats") public org.springframework.http.ResponseEntity<Map<String,Object>> getCacheStats()获取缓存统计信息- Returns:
- 缓存统计
-