570 lines
27 KiB
Go
570 lines
27 KiB
Go
package dto
|
||
|
||
// PostCommentRequest 发布评论请求
|
||
type PostCommentRequest struct {
|
||
ID string `json:"id"` // Ayrshare Post ID or Social Post ID
|
||
Comment string `json:"comment"` // 评论内容
|
||
Platforms []string `json:"platforms"` // 平台列表,支持 Ayrshare 评论接口支持的平台,例如 ["instagram", "tiktok", "facebook", "linkedin", "twitter", "youtube", "bluesky"]
|
||
SearchPlatformId *bool `json:"searchPlatformId,omitempty"` // 是否使用 Social Post ID
|
||
MediaUrls []string `json:"mediaUrls,omitempty"` // 媒体URL(仅支持 Facebook, LinkedIn, X/Twitter)
|
||
ProfileKey string `json:"-"` // Profile Key,不序列化
|
||
}
|
||
|
||
// BlueskyCommentResponse Bluesky 平台评论响应
|
||
type BlueskyCommentResponse struct {
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId"` // Bluesky Social Comment ID
|
||
Cid string `json:"cid,omitempty"` // Bluesky Comment CID
|
||
Comment string `json:"comment"` // 评论内容
|
||
Platform string `json:"platform"` // 平台标识,一般为 "bluesky"
|
||
PostUrl string `json:"postUrl,omitempty"` // 评论对应的访问 URL
|
||
}
|
||
|
||
// FacebookCommentResponse Facebook 平台评论响应
|
||
type FacebookCommentResponse struct {
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId"` // Facebook Social Comment ID
|
||
Comment string `json:"comment"` // 评论内容
|
||
Platform string `json:"platform"` // 平台标识,一般为 "facebook"
|
||
}
|
||
|
||
// InstagramCommentResponse Instagram 平台评论响应
|
||
type InstagramCommentResponse struct {
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId"` // Instagram Social Comment ID
|
||
Comment string `json:"comment"`
|
||
Platform string `json:"platform"`
|
||
}
|
||
|
||
// LinkedInCommentResponse LinkedIn 平台评论响应
|
||
type LinkedInCommentResponse struct {
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId"` // LinkedIn Social Comment ID
|
||
Comment string `json:"comment"` // 评论内容
|
||
CommentUrn string `json:"commentUrn,omitempty"` // LinkedIn Comment URN
|
||
Platform string `json:"platform"` // 平台标识,一般为 "linkedin"
|
||
}
|
||
|
||
// TikTokCommentResponse TikTok 平台评论响应
|
||
type TikTokCommentResponse struct {
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId"` // TikTok Social Comment ID
|
||
Comment string `json:"comment"`
|
||
Platform string `json:"platform"`
|
||
VideoId string `json:"videoId,omitempty"` // TikTok Social Post ID
|
||
}
|
||
|
||
// PlatformError 平台错误信息
|
||
type PlatformError struct {
|
||
Action string `json:"action"`
|
||
Status string `json:"status"`
|
||
Code int `json:"code"`
|
||
Message string `json:"message"`
|
||
Platform string `json:"platform"`
|
||
}
|
||
|
||
// PostCommentResponse 发布评论响应
|
||
type PostCommentResponse struct {
|
||
Status string `json:"status"`
|
||
CommentID string `json:"commentID,omitempty"` // Ayrshare Comment ID
|
||
CommentId string `json:"commentId,omitempty"` // Ayrshare Comment ID (错误响应中可能使用此字段)
|
||
ID string `json:"id,omitempty"` // Ayrshare Post ID
|
||
// 各平台成功响应信息(字段命名与 Ayrshare 文档示例对应)
|
||
Bluesky *BlueskyCommentResponse `json:"bluesky,omitempty"`
|
||
Facebook *FacebookCommentResponse `json:"facebook,omitempty"`
|
||
Instagram *InstagramCommentResponse `json:"instagram,omitempty"`
|
||
LinkedIn *LinkedInCommentResponse `json:"linkedin,omitempty"`
|
||
TikTok *TikTokCommentResponse `json:"tiktok,omitempty"`
|
||
Twitter *TwitterCommentResponse `json:"twitter,omitempty"`
|
||
YouTube *YouTubeCommentResponse `json:"youtube,omitempty"`
|
||
// 错误相关字段
|
||
Action string `json:"action,omitempty"`
|
||
Code int `json:"code,omitempty"`
|
||
Message string `json:"message,omitempty"`
|
||
Platform string `json:"platform,omitempty"`
|
||
Errors []PlatformError `json:"errors,omitempty"`
|
||
}
|
||
|
||
// TwitterCommentResponse Twitter/X 平台评论响应
|
||
type TwitterCommentResponse struct {
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId"` // Twitter Social Comment ID
|
||
Comment string `json:"comment"` // 评论内容
|
||
PostUrl string `json:"postUrl,omitempty"` // 评论对应的访问 URL
|
||
}
|
||
|
||
// YouTubeCommentResponse YouTube 平台评论响应
|
||
type YouTubeCommentResponse struct {
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId"` // YouTube Social Comment ID
|
||
Comment string `json:"comment"` // 评论内容
|
||
Platform string `json:"platform"` // 平台标识,一般为 "youtube"
|
||
}
|
||
|
||
// GetCommentRequest 获取评论请求
|
||
type GetCommentRequest struct {
|
||
ID string `json:"id"` // Ayrshare Post ID or Social Post ID
|
||
ProfileKey string `json:"-"` // Profile Key,不序列化
|
||
}
|
||
|
||
// BlueskyComment Bluesky 评论详情
|
||
type BlueskyComment struct {
|
||
Comment string `json:"comment"`
|
||
CommentId string `json:"commentId"` // Bluesky Social Comment ID
|
||
Created string `json:"created"`
|
||
DisplayName string `json:"displayName,omitempty"`
|
||
LikeCount int `json:"likeCount"`
|
||
Platform string `json:"platform"`
|
||
ProfileImageUrl string `json:"profileImageUrl,omitempty"`
|
||
QuoteCount int `json:"quoteCount,omitempty"`
|
||
Replies []BlueskyComment `json:"replies,omitempty"`
|
||
ReplyCount int `json:"replyCount,omitempty"`
|
||
ReplyTo string `json:"replyTo,omitempty"`
|
||
RepostCount int `json:"repostCount,omitempty"`
|
||
UserName string `json:"userName,omitempty"`
|
||
}
|
||
|
||
// FacebookUser Facebook 用户信息
|
||
type FacebookUser struct {
|
||
Name string `json:"name"`
|
||
Id string `json:"id"`
|
||
}
|
||
|
||
// FacebookParent Facebook 父级评论/帖子信息
|
||
type FacebookParent struct {
|
||
CreatedTime string `json:"createdTime,omitempty"`
|
||
From *FacebookUser `json:"from,omitempty"`
|
||
Message string `json:"message,omitempty"`
|
||
Id string `json:"id,omitempty"`
|
||
}
|
||
|
||
// FacebookComment Facebook 评论详情(用于主评论和回复)
|
||
type FacebookComment struct {
|
||
Comment string `json:"comment"`
|
||
CommentId string `json:"commentId"` // Facebook Social Comment ID
|
||
CommentCount int `json:"commentCount,omitempty"` // 回复数量
|
||
CommentUrl string `json:"commentUrl,omitempty"`
|
||
Company bool `json:"company,omitempty"`
|
||
Created string `json:"created"`
|
||
From *FacebookUser `json:"from,omitempty"`
|
||
LikeCount int `json:"likeCount"`
|
||
Parent *FacebookParent `json:"parent,omitempty"`
|
||
Platform string `json:"platform"`
|
||
UserLikes bool `json:"userLikes"`
|
||
Replies []FacebookComment `json:"replies,omitempty"`
|
||
}
|
||
|
||
// InstagramComment Instagram 评论详情
|
||
type InstagramComment struct {
|
||
Comment string `json:"comment"`
|
||
CommentId string `json:"commentId,omitempty"` // Instagram Social Comment ID (主评论使用)
|
||
Id string `json:"id,omitempty"` // Instagram Social Comment ID (回复评论使用)
|
||
Created string `json:"created"`
|
||
From *InstagramUser `json:"from,omitempty"`
|
||
Hidden bool `json:"hidden"`
|
||
LikeCount int `json:"likeCount"`
|
||
ParentId string `json:"parentId,omitempty"` // The Instagram Social Post ID of the parent post
|
||
Platform string `json:"platform"`
|
||
PostId string `json:"postId"` // The Instagram top level post ID (original post)
|
||
Replies []InstagramComment `json:"replies,omitempty"`
|
||
User *InstagramUserInfo `json:"user,omitempty"`
|
||
UserName string `json:"userName,omitempty"`
|
||
Username string `json:"username,omitempty"` // 回复评论可能使用 username 字段
|
||
}
|
||
|
||
// InstagramUser Instagram 用户信息
|
||
type InstagramUser struct {
|
||
Name string `json:"name"`
|
||
Id string `json:"id"`
|
||
Username string `json:"username,omitempty"`
|
||
}
|
||
|
||
// InstagramUserInfo Instagram 用户ID信息
|
||
type InstagramUserInfo struct {
|
||
Id string `json:"id"`
|
||
}
|
||
|
||
// LinkedInMedia LinkedIn 评论中的媒体信息
|
||
type LinkedInMedia struct {
|
||
Type string `json:"type"`
|
||
Url string `json:"url"`
|
||
}
|
||
|
||
// LinkedInFrom LinkedIn 评论发布者信息
|
||
type LinkedInFrom struct {
|
||
Name string `json:"name"`
|
||
Id interface{} `json:"id"`
|
||
Url string `json:"url,omitempty"`
|
||
Description string `json:"description,omitempty"`
|
||
}
|
||
|
||
// LinkedInComment LinkedIn 评论详情
|
||
type LinkedInComment struct {
|
||
Comment string `json:"comment"`
|
||
CommentId string `json:"commentId"` // LinkedIn Social Comment ID
|
||
CommentUrn string `json:"commentUrn,omitempty"` // Social comment id from LinkedIn
|
||
Created string `json:"created"`
|
||
From *LinkedInFrom `json:"from,omitempty"`
|
||
LikeCount int `json:"likeCount"`
|
||
Media []LinkedInMedia `json:"media,omitempty"`
|
||
Platform string `json:"platform"`
|
||
ProfileImageUrl string `json:"profileImageUrl,omitempty"`
|
||
UserName string `json:"userName,omitempty"`
|
||
Founded int `json:"founded,omitempty"`
|
||
OrganizationType string `json:"organizationType,omitempty"`
|
||
Website string `json:"website,omitempty"`
|
||
}
|
||
|
||
// RedditUser Reddit 用户信息
|
||
type RedditUser struct {
|
||
Name string `json:"name"`
|
||
Id string `json:"id"`
|
||
}
|
||
|
||
// RedditComment Reddit 评论详情
|
||
type RedditComment struct {
|
||
Comment string `json:"comment"`
|
||
CommentId string `json:"commentId"`
|
||
Created string `json:"created"`
|
||
From *RedditUser `json:"from,omitempty"`
|
||
CommentUrl string `json:"commentUrl,omitempty"`
|
||
Subreddit string `json:"subreddit,omitempty"`
|
||
Ups int `json:"ups,omitempty"`
|
||
IsSubmitter bool `json:"isSubmitter"`
|
||
}
|
||
|
||
// ThreadsComment Threads 评论详情(用于主评论和回复)
|
||
type ThreadsComment struct {
|
||
Comment string `json:"comment"`
|
||
CommentId string `json:"commentId"`
|
||
CommentUrl string `json:"commentUrl,omitempty"`
|
||
Created string `json:"created"`
|
||
HasReplies bool `json:"hasReplies"`
|
||
IsQuotePost bool `json:"isQuotePost"`
|
||
IsReply bool `json:"isReply"`
|
||
IsReplyOwnedByMe bool `json:"isReplyOwnedByMe"`
|
||
MediaType string `json:"mediaType,omitempty"`
|
||
ParentId string `json:"parentId,omitempty"`
|
||
Platform string `json:"platform"`
|
||
PostId string `json:"postId"`
|
||
Replies []ThreadsComment `json:"replies,omitempty"`
|
||
ReplyAudience string `json:"replyAudience,omitempty"`
|
||
Shortcode string `json:"shortcode,omitempty"`
|
||
UserName string `json:"userName,omitempty"`
|
||
}
|
||
|
||
// TikTokComment TikTok 评论详情
|
||
type TikTokComment struct {
|
||
Comment string `json:"comment"`
|
||
CommentId string `json:"commentId"` // TikTok Social Comment ID
|
||
Created string `json:"created"`
|
||
CreateTime string `json:"createTime,omitempty"` // 回复评论的创建时间
|
||
DisplayName string `json:"displayName,omitempty"`
|
||
Liked bool `json:"liked"` // Whether the user who posted the video has liked the comment
|
||
Likes int `json:"likes,omitempty"` // 回复评论的点赞数
|
||
LikeCount int `json:"likeCount"`
|
||
Owner bool `json:"owner"` // Whether the user who posted the video made the comment
|
||
ParentCommentId string `json:"parentCommentId,omitempty"` // TikTok Parent Social Comment ID
|
||
Pinned bool `json:"pinned"` // If the comment is pinned
|
||
Platform string `json:"platform"`
|
||
ProfileImageUrl string `json:"profileImageUrl,omitempty"`
|
||
Replies []TikTokComment `json:"replies,omitempty"`
|
||
Status string `json:"status,omitempty"`
|
||
UserId string `json:"userId,omitempty"`
|
||
Username string `json:"username,omitempty"`
|
||
VideoId string `json:"videoId"` // TikTok Social Post ID
|
||
Visibility string `json:"visibility,omitempty"`
|
||
}
|
||
|
||
// TwitterUserPublicMetrics Twitter/X 用户公共指标(用户维度,用于 Get Comments 返回)
|
||
type TwitterUserPublicMetrics struct {
|
||
FollowersCount int `json:"followersCount,omitempty"`
|
||
FollowingCount int `json:"followingCount,omitempty"`
|
||
TweetCount int `json:"tweetCount,omitempty"`
|
||
ListedCount int `json:"listedCount,omitempty"`
|
||
LikeCount int `json:"likeCount,omitempty"`
|
||
MediaCount int `json:"mediaCount,omitempty"`
|
||
}
|
||
|
||
// TwitterReferencedTweet 被引用或回复的 Tweet 信息
|
||
type TwitterReferencedTweet struct {
|
||
Type string `json:"type"`
|
||
Id string `json:"id"`
|
||
}
|
||
|
||
// TwitterReplyTo 被回复的用户信息
|
||
type TwitterReplyTo struct {
|
||
CreatedAt string `json:"createdAt,omitempty"`
|
||
Description string `json:"description,omitempty"`
|
||
Id string `json:"id,omitempty"`
|
||
Location string `json:"location,omitempty"`
|
||
Name string `json:"name,omitempty"`
|
||
ProfileImageUrl string `json:"profileImageUrl,omitempty"`
|
||
PublicMetrics *TwitterUserPublicMetrics `json:"publicMetrics,omitempty"`
|
||
Url string `json:"url,omitempty"`
|
||
Username string `json:"username,omitempty"`
|
||
}
|
||
|
||
// TwitterComment Twitter/X 评论详情
|
||
type TwitterComment struct {
|
||
BookmarkCount int `json:"bookmarkCount,omitempty"`
|
||
Comment string `json:"comment"`
|
||
CommentId string `json:"commentId"` // Twitter Social Comment ID
|
||
Created string `json:"created"`
|
||
Description string `json:"description,omitempty"`
|
||
Id string `json:"id"` // Twitter Social Post ID
|
||
ImpressionCount int `json:"impressionCount,omitempty"`
|
||
LikeCount int `json:"likeCount,omitempty"`
|
||
Name string `json:"name,omitempty"`
|
||
Platform string `json:"platform"`
|
||
ProfileImageUrl string `json:"profileImageUrl,omitempty"`
|
||
PublicMetrics *TwitterUserPublicMetrics `json:"publicMetrics,omitempty"`
|
||
QuoteCount int `json:"quoteCount,omitempty"`
|
||
ReferencedTweets []TwitterReferencedTweet `json:"referencedTweets,omitempty"`
|
||
ReplyCount int `json:"replyCount,omitempty"`
|
||
ReplyTo *TwitterReplyTo `json:"replyTo,omitempty"`
|
||
ThreadNumber int `json:"threadNumber,omitempty"`
|
||
UserName string `json:"userName,omitempty"`
|
||
}
|
||
|
||
// YouTubeReply YouTube 回复评论详情
|
||
type YouTubeReply struct {
|
||
ChannelUrl string `json:"channelUrl,omitempty"`
|
||
Comment string `json:"comment"`
|
||
CommentId string `json:"commentId"`
|
||
Created string `json:"created"`
|
||
LikeCount int `json:"likeCount"`
|
||
Platform string `json:"platform"`
|
||
ProfileImageUrl string `json:"profileImageUrl,omitempty"`
|
||
UserName string `json:"userName,omitempty"`
|
||
ParentId string `json:"parentId,omitempty"`
|
||
}
|
||
|
||
// YouTubeComment YouTube 评论详情
|
||
type YouTubeComment struct {
|
||
ChannelUrl string `json:"channelUrl,omitempty"`
|
||
Comment string `json:"comment"`
|
||
CommentId string `json:"commentId"` // YouTube Social Comment ID
|
||
Created string `json:"created"`
|
||
IsPublic bool `json:"isPublic"`
|
||
LikeCount int `json:"likeCount"`
|
||
Platform string `json:"platform"`
|
||
ProfileImageUrl string `json:"profileImageUrl,omitempty"`
|
||
Replies []YouTubeReply `json:"replies,omitempty"`
|
||
UserName string `json:"userName,omitempty"`
|
||
}
|
||
|
||
// GetCommentResponse 获取评论响应
|
||
type GetCommentResponse struct {
|
||
Bluesky []BlueskyComment `json:"bluesky,omitempty"`
|
||
Facebook []FacebookComment `json:"facebook,omitempty"`
|
||
Instagram []InstagramComment `json:"instagram,omitempty"`
|
||
LinkedIn []LinkedInComment `json:"linkedin,omitempty"`
|
||
Reddit []RedditComment `json:"reddit,omitempty"`
|
||
Threads []ThreadsComment `json:"threads,omitempty"`
|
||
TikTok []TikTokComment `json:"tiktok,omitempty"`
|
||
Twitter []TwitterComment `json:"twitter,omitempty"`
|
||
YouTube []YouTubeComment `json:"youtube,omitempty"`
|
||
Status string `json:"status"`
|
||
ID string `json:"id,omitempty"`
|
||
LastUpdated string `json:"lastUpdated,omitempty"`
|
||
NextUpdate string `json:"nextUpdate,omitempty"`
|
||
// 错误相关字段
|
||
Action string `json:"action,omitempty"`
|
||
Code int `json:"code,omitempty"`
|
||
Message string `json:"message,omitempty"`
|
||
}
|
||
|
||
// DeleteCommentRequest 删除评论请求
|
||
type DeleteCommentRequest struct {
|
||
ID string `json:"-"` // Ayrshare Post ID, Ayrshare Comment ID, or Social Comment ID (路径参数)
|
||
Platforms []string `json:"platforms,omitempty"` // 平台列表(使用 Ayrshare ID 时必填)
|
||
Platform string `json:"platform,omitempty"` // 单个平台(使用 Social Comment ID 时必填)
|
||
SearchPlatformId *bool `json:"searchPlatformId,omitempty"` // 是否使用 Social Comment ID
|
||
ProfileKey string `json:"-"` // Profile Key,不序列化
|
||
}
|
||
|
||
// InstagramDeleteResponse Instagram 删除评论响应(单条)
|
||
type InstagramDeleteResponse struct {
|
||
Action string `json:"action"`
|
||
Status string `json:"status"`
|
||
Id string `json:"id"` // Instagram Social Comment ID
|
||
Comment string `json:"comment"`
|
||
}
|
||
|
||
// TikTokDeleteResponse TikTok 删除评论响应(单条)
|
||
type TikTokDeleteResponse struct {
|
||
Action string `json:"action"`
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId,omitempty"` // Deprecated, use id instead
|
||
Id string `json:"id"` // TikTok Social Comment ID
|
||
Comment string `json:"comment"`
|
||
}
|
||
|
||
// BlueskyDeleteResponse Bluesky 删除评论响应(单条)
|
||
type BlueskyDeleteResponse struct {
|
||
Action string `json:"action"`
|
||
Status string `json:"status"`
|
||
Id string `json:"id"` // Bluesky Social Comment ID
|
||
Comment string `json:"comment,omitempty"` // 删除的评论内容
|
||
}
|
||
|
||
// FacebookDeleteResponse Facebook 删除评论响应(单条)
|
||
type FacebookDeleteResponse struct {
|
||
Action string `json:"action"`
|
||
Status string `json:"status"`
|
||
Id string `json:"id"` // Facebook Social Comment ID
|
||
Comment string `json:"comment,omitempty"` // 删除的评论内容
|
||
}
|
||
|
||
// LinkedInDeleteResponse LinkedIn 删除评论响应(单条)
|
||
type LinkedInDeleteResponse struct {
|
||
Action string `json:"action"`
|
||
Status string `json:"status"`
|
||
Id string `json:"id"` // LinkedIn Social Comment ID
|
||
Comment string `json:"comment,omitempty"` // 删除的评论内容
|
||
}
|
||
|
||
// ThreadsDeleteResponse Threads 删除评论响应(单条)
|
||
type ThreadsDeleteResponse struct {
|
||
Action string `json:"action"`
|
||
Status string `json:"status"`
|
||
Id string `json:"id"` // Threads Social Comment ID
|
||
}
|
||
|
||
// TwitterDeletePostResponse Twitter 删除的单条评论信息
|
||
type TwitterDeletePostResponse struct {
|
||
Action string `json:"action"`
|
||
Status string `json:"status"`
|
||
Id string `json:"id"` // Twitter Social Comment ID
|
||
Comment string `json:"comment,omitempty"` // 删除的评论内容
|
||
}
|
||
|
||
// TwitterDeleteResponse Twitter 删除评论响应(单条或批量中的元素)
|
||
type TwitterDeleteResponse struct {
|
||
Action string `json:"action"`
|
||
Status string `json:"status,omitempty"`
|
||
Id string `json:"id,omitempty"` // Twitter Social Comment ID(单条删除时返回)
|
||
Comment string `json:"comment,omitempty"` // 删除的评论内容(单条删除时返回)
|
||
Posts []TwitterDeletePostResponse `json:"posts,omitempty"` // 批量删除时返回的评论列表
|
||
}
|
||
|
||
// YouTubeDeleteResponse YouTube 删除评论响应(单条)
|
||
type YouTubeDeleteResponse struct {
|
||
Action string `json:"action"`
|
||
Status string `json:"status"`
|
||
Id string `json:"id"` // YouTube Social Comment ID
|
||
Comment string `json:"comment,omitempty"` // 删除的评论内容
|
||
}
|
||
|
||
// DeleteCommentResponse 删除评论响应
|
||
type DeleteCommentResponse struct {
|
||
Status string `json:"status"`
|
||
Bluesky interface{} `json:"bluesky,omitempty"` // 可能是 BlueskyDeleteResponse 或 []BlueskyDeleteResponse
|
||
Facebook interface{} `json:"facebook,omitempty"` // 可能是 FacebookDeleteResponse 或 []FacebookDeleteResponse
|
||
Instagram interface{} `json:"instagram,omitempty"` // 可能是 InstagramDeleteResponse 或 []InstagramDeleteResponse
|
||
LinkedIn interface{} `json:"linkedin,omitempty"` // 可能是 LinkedInDeleteResponse 或 []LinkedInDeleteResponse
|
||
Threads interface{} `json:"threads,omitempty"` // 可能是 ThreadsDeleteResponse 或 []ThreadsDeleteResponse
|
||
TikTok interface{} `json:"tiktok,omitempty"` // 可能是 TikTokDeleteResponse 或 []TikTokDeleteResponse
|
||
Twitter interface{} `json:"twitter,omitempty"` // 可能是 TwitterDeleteResponse 或 []TwitterDeleteResponse
|
||
YouTube interface{} `json:"youtube,omitempty"` // 可能是 YouTubeDeleteResponse 或 []YouTubeDeleteResponse
|
||
// 错误相关字段
|
||
Action string `json:"action,omitempty"`
|
||
Code int `json:"code,omitempty"`
|
||
Message string `json:"message,omitempty"`
|
||
}
|
||
|
||
// ReplyCommentRequest 回复评论请求
|
||
type ReplyCommentRequest struct {
|
||
ID string `json:"-"` // Ayrshare Comment ID (路径参数)
|
||
Comment string `json:"comment"` // 回复内容
|
||
Platforms []string `json:"platforms"` // 平台列表,支持 Ayrshare 回复评论接口支持的平台,例如 ["instagram", "tiktok", "facebook", "linkedin", "twitter", "youtube", "bluesky"]
|
||
ProfileKey string `json:"-"` // Profile Key,不序列化
|
||
}
|
||
|
||
// BlueskyReplyResponse Bluesky 回复评论响应
|
||
type BlueskyReplyResponse struct {
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId"` // Bluesky Social Comment ID
|
||
Cid string `json:"cid,omitempty"` // Bluesky Comment CID
|
||
Comment string `json:"comment"` // 回复内容
|
||
Platform string `json:"platform"` // 平台标识,一般为 "bluesky"
|
||
PostUrl string `json:"postUrl,omitempty"` // 回复评论的访问 URL
|
||
SourceCommentId string `json:"sourceCommentId"` // 原始评论的 Bluesky Social Comment ID
|
||
}
|
||
|
||
// FacebookReplyResponse Facebook 回复评论响应
|
||
type FacebookReplyResponse struct {
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId"` // Facebook Social Comment ID
|
||
SourceCommentId string `json:"sourceCommentId"` // 原始评论的 Facebook Social Comment ID
|
||
Comment string `json:"comment"` // 回复内容
|
||
Platform string `json:"platform"` // 平台标识,一般为 "facebook"
|
||
}
|
||
|
||
// InstagramReplyResponse Instagram 回复评论响应
|
||
type InstagramReplyResponse struct {
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId"` // Instagram Social Comment ID
|
||
SourceCommentId string `json:"sourceCommentId"` // 原始评论的 Instagram Social Comment ID
|
||
Comment string `json:"comment"`
|
||
Platform string `json:"platform"`
|
||
}
|
||
|
||
// TikTokReplyResponse TikTok 回复评论响应
|
||
type TikTokReplyResponse struct {
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId"` // TikTok Social Comment ID
|
||
SourceCommentId string `json:"sourceCommentId"` // 原始评论的 TikTok Social Comment ID
|
||
Comment string `json:"comment"`
|
||
Platform string `json:"platform"`
|
||
VideoId string `json:"videoId,omitempty"` // TikTok Social Post ID
|
||
}
|
||
|
||
// LinkedInReplyResponse LinkedIn 回复评论响应
|
||
type LinkedInReplyResponse struct {
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId"` // LinkedIn Social Comment ID
|
||
SourceCommentId string `json:"sourceCommentId"` // 原始评论的 LinkedIn Social Comment ID
|
||
Comment string `json:"comment"` // 回复内容
|
||
Platform string `json:"platform"` // 平台标识,一般为 "linkedin"
|
||
}
|
||
|
||
// TwitterReplyResponse Twitter/X 回复评论响应
|
||
type TwitterReplyResponse struct {
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId"` // Twitter Social Comment ID
|
||
SourceCommentId string `json:"sourceCommentId"` // 原始评论的 Twitter Social Comment ID
|
||
Comment string `json:"comment"` // 回复内容
|
||
Platform string `json:"platform"` // 平台标识,一般为 "twitter"
|
||
PostUrl string `json:"postUrl,omitempty"` // 回复评论的访问 URL
|
||
}
|
||
|
||
// YouTubeReplyResponse YouTube 回复评论响应
|
||
type YouTubeReplyResponse struct {
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId"` // YouTube Social Comment ID
|
||
SourceCommentId string `json:"sourceCommentId"` // 原始评论的 YouTube Social Comment ID
|
||
Comment string `json:"comment"` // 回复内容
|
||
Platform string `json:"platform"` // 平台标识,一般为 "youtube"
|
||
}
|
||
|
||
// ReplyCommentResponse 回复评论响应
|
||
type ReplyCommentResponse struct {
|
||
Status string `json:"status"`
|
||
CommentId string `json:"commentId,omitempty"` // Ayrshare Comment ID,用于后续再次回复
|
||
ID string `json:"id,omitempty"` // Ayrshare Comment ID
|
||
Bluesky *BlueskyReplyResponse `json:"bluesky,omitempty"`
|
||
Facebook *FacebookReplyResponse `json:"facebook,omitempty"`
|
||
Instagram *InstagramReplyResponse `json:"instagram,omitempty"`
|
||
LinkedIn *LinkedInReplyResponse `json:"linkedin,omitempty"`
|
||
TikTok *TikTokReplyResponse `json:"tiktok,omitempty"`
|
||
Twitter *TwitterReplyResponse `json:"twitter,omitempty"`
|
||
YouTube *YouTubeReplyResponse `json:"youtube,omitempty"`
|
||
// 错误相关字段
|
||
Action string `json:"action,omitempty"`
|
||
Code int `json:"code,omitempty"`
|
||
Message string `json:"message,omitempty"`
|
||
Errors []PlatformError `json:"errors,omitempty"`
|
||
}
|