Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Moment related methods #142

Open
su-chang opened this issue Aug 30, 2021 · 2 comments
Open

Support Moment related methods #142

su-chang opened this issue Aug 30, 2021 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@su-chang
Copy link
Member

su-chang commented Aug 30, 2021

Methods List Supported by WxWork

  abstract momentSignature (signature?: string)                              : Promise<boolean | string>
  abstract momentCoverage (image: FileBox)                                   : Promise<boolean>
  abstract postTextMoment (content: string, visibleList?: string[])          : Promise<string>
  abstract postLinkMoment (urlLinkPayload: UrlLinkPayload, content?: string) : Promise<string>
  abstract postImageMoment (images: FileBox[], content?: string)             : Promise<string>
  abstract momentPayload (id: string)                                        : Promise<MomentPayload>

Other Methods Should be Supported

  abstract momentList (option?: MomentListOption)                            : Promise<string[]>
  abstract revokeMoment (id: string)                                         : Promise<boolean>
  abstract likeMoment (id: string)                                           : Promise<boolean>
  abstract revokeLikeMoment (id: string)                                     : Promise<boolean>
  abstract commentMoment (id: string, comment: string, commentId?: string)   : Promise<string>
  abstract revokeCommentMoment (commentId: string)                           : Promise<boolean>

Data Structure

export interface MomentPayload {
  authorId: string,
  content?: string,
  urlLink?: UrlLinkPayload,
  images?: FileBox[],
  id: string,
  createTime: number,
  updateTime: number,
}

export interface MomentListOption {
  authorId?: string,
  momentId?: string,
  page?: number,
}
@su-chang
Copy link
Member Author

Related issue: wechaty/wechaty#1880

@su-chang su-chang mentioned this issue Sep 2, 2021
@huan
Copy link
Member

huan commented Jan 22, 2022

The moments API will be implemented by

Do we need to keep this issue open for the moment related apis?

@huan huan added the duplicate This issue or pull request already exists label Jan 22, 2022
@huan huan closed this as completed Jan 22, 2022
@huan huan reopened this Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants