Skip to content
Hongarc edited this page May 14, 2019 · 1 revision

api


Id: string

  • addFriend(userId: Id): request friend to userId.

  • addUserToThread(threadId: Id, ...userIds: Id[]): add userIds to thread threadId.

  • archived(archive: boolean, ...listId: Id[]):

    • archive: true to archive, false to un-archive
    • listId: array id of thread or user to archive(or not)
  • blockMessage(id: Id): block message id(thread or user).

  • blockPage(pageId: Id, isBlock: boolean = true): block page pageId, unblock if isBlock = false.

  • blockUser(userId: Id): block user with Id userId.

  • bookmark(id: Id, i: number = 0):

    • i = 0: add id to top of bookmark
    • i = 1: don't mark id to top of bookmark
    • i = 2: remove id from bookmark
  • cancelFriend(userId: Id): after request friend, remove request friend.

  • cancelJoinGroup(groupId: Id): after request join group, remove that request.

  • changeBio(bio: string, limit: number = -1): change intro of your profile to bio in limit(s), default unlimited.

  • changeEmoji(threadId: Id, emoji: string): set emoji of threadId to emoji.

  • changeNickname(nickname: string, threadId: Id, participantId?: Id):

    • nickname: new nickname
    • threadId: change nickname in threadId
    • participantId: id of participant, if don't set, participantId = threadId
  • createPoll(threadId: Id, title: string, options: Form):

    • threadId: thread to create poll
    • title: question to ask
    • options: object with key is anwser, value is choosed or not
  • deleteMessage(...msgIds: Id[]): msgIds is list id of msg to delete.

  • deleteThread(...threadIds: Id[]): threadIds is list id of thread to delete.

  • followProfile(userId: Id, isFollow: boolean = true): (un)follow userId.

  • forwardAttachment(attachmentId: Id, ...threadIds: Id[]): someone send you a file, you forward it

    • attachmentId: id of file
    • threadIds: list send file to thread/user
  • getMyId(): return your fbid.

  • getPhotoUrl(photoId: Id): get url of photo has id photoId.

todo

  • getUserInfo(...userIds: Id[]): __.

  • joinGroup(groupId: Id, options?: Form): __.

  • leaveGroup(groupId: Id): __.

  • markAsRead(...listId: Id[]): __.

  • messageRequest(isAccept: boolean, ...threadIds: Id[]): __.

  • muteThread(threadId: Id, second: number): __.

  • pull(form: Form = {}): __.

  • removeFriend(userId: Id): __.

  • removeMember(groupId: Id, memberId: Id, delIndexs: number[] = []): __.

  • removeParticipant(threadId: Id, userId: Id): __.

  • send(form: Form): __.

  • sendMsg(msg: Message, threadId: Id): __.

  • sendTyping(userId: Id, isTyping: boolean = true): __.

  • setAdminThread(thread: Id, isAdmin: boolean, ...adminIds: Id[]): __.

  • setApprovalMode(threadId: Id, isNeed: boolean): __.

  • setTitle(threadId: Id, title: string): __.

  • shareUrl(uri: string): __.

  • subFollow(userId: Id, isSeeFirst: boolean = true): __.

  • unblockMessage(id: Id): __.

  • unblockUser(userId: Id): __.

  • undoActivityGroup(groupId: Id, activityId: Id): __.

  • unfollowGroup(groupId: Id, isUnfollow: boolean = true): __.

  • uploadFile(attachment: ReadStream): __.

Clone this wiki locally