-
Notifications
You must be signed in to change notification settings - Fork 65
Grpc Moments API
SuperChang edited this page Dec 4, 2019
·
2 revisions
-
Post Moments
-
Text Moments
-
Request Params
{ text: string, title: string, description: string, contentUrl: string, media: MomentsMedia[], // [] count: number, // 0 }
-
Response Result
{ data: string, message: string, status: number, }
-
-
Media Moments(picture, video, picture + text)
-
Request Params
{ text: string, // 若不想配文,置''即可 title: string, description: string, contentUrl: string, media: MomentsMedia[], // 图片/视频资源数组 count: number, // 数组的长度 }
MomentsMedia { height?: string, // 图片高度,默认"0.0" thumb: string, // 图片小图地址/图文链接图片地址/视频预览图地址 totalSize: string, // 视频大小,未知则填"" url: string, // 图片大图地址/图文链接图片地址/视频地址 width?: string, // 图片宽度,默认"0.0" }
-
Response Result
{ data: string, message: string, status: number, }
-
-
UrlLink Moments
-
Request Params
{ text: string, title: string, description: string, contentUrl: string, media: MomentsMedia[], // put url link thumbnail here count: number, // the media length }
-
Response Result
{ data: string, message: string, status: number, }
-
-
-
Moments List
-
Request Params (NO NEED)
-
Response Result
MomentsListGrpcResponse { SnsObjectsCount: string, status: string, source: string, message: string, FirstPageMd5: string, ReqTime: string, data: string, }
The data is string of class
MomentsItemGrpcResponse
MomentsItemGrpcResponse { WithUserCount: number, create_time: number, user_name: string, description: string, CommentCount: number, id: string, NickName: string, LikeCount: number, like?: MomentsLikeGrpcDetail[], comment?: MomentsCommentsGrpcDetail[], }
MomentsLikeGrpcDetail { create_time: number, user_name: string, nick_name: string, }
MomentsCommentsGrpcDetail { create_time: number, reply_id: number, user_name: string, nick_name: string, reply_user_name: string, id: number, content: string, }
-
-
Moments List of Contact
-
Request Params
{ snsId: string, // 朋友圈ID firstPageMd5: string, // 上次朋友圈请求获取的MD5,无则传"" friendUserName: string, // 指定好友微信号 }
-
Response Result
MomentsListGrpcResponse { SnsObjectsCount: string, status: string, source: string, message: string, FirstPageMd5: string, ReqTime: string, data: string, }
The data is string of class
MomentsItemGrpcResponse
MomentsItemGrpcResponse { WithUserCount: number, create_time: number, user_name: string, description: string, CommentCount: number, id: string, NickName: string, LikeCount: number, like?: MomentsLikeGrpcDetail[], comment?: MomentsCommentsGrpcDetail[], }
MomentsLikeGrpcDetail { create_time: number, user_name: string, nick_name: string, }
MomentsCommentsGrpcDetail { create_time: number, reply_id: number, user_name: string, nick_name: string, reply_user_name: string, id: number, content: string, }
-
-
Moments Detail
-
Request Params
{ snsId: string, // 朋友圈ID }
-
Response Result
MomentsDetailGrpcResponse { data: string, message: string, status: string, }
The data of
MomentsDetailGrpcResponse
is string of classMomentsItemGrpcResponse
-
-
Comment / Like
-
Request Params
{ toUserName: string, // 朋友圈发送者的wxid userName: string, // 机器人的wxid comment: string, // 若为 '' 则为点赞 snsId: string, // 朋友圈ID replyId: number, // 回复某评论的ID }
-
Response Result
{ message: string, status: number, }
-
-
Delete Moments / Dislike
-
Request Params
{ type: number, commentType: 2 || 3, // 固定数值 commentId: '0', // 评论ID,暂不支持删除评论,故此处填固定数值 snsId: string, // 朋友圈ID }
-
Response Result
{ message: string, status: 0, // 成功 }
-