Package io.rong.imkit.usermanage.group.application

## Class GroupApplicationsViewModel

- All Implemented Interfaces:

      public class GroupApplicationsViewModel

  群组申请 ViewModel

  Since:

    5.12.2

  Author:

    rongcloud

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `public final MutableLiveData<List<GroupApplicationInfo>>` | `groupApplicationInfoListLiveData` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `GroupApplicationsViewModel(Bundle arguments)` |

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `MutableLiveData<List<GroupApplicationInfo>>` | `getGroupApplicationInfoListLiveData()` |
    `void` | `getGroupApplications(Array<GroupApplicationDirection> directions, Array<GroupApplicationStatus> status)` | 获取群组申请
    `void` | `)>acceptGroupInvite(String groupId, String inviterId, OnDataChangeListener<Boolean> onDataChangeListener)` | 接受群组邀请
    `void` | `)>refuseGroupInvite(String groupId, String inviterId, String reason, OnDataChangeListener<Boolean> onDataChangeListener)` | 拒绝群组邀请
    `void` | `)>acceptGroupApplication(String groupId, String inviterId, String applicantId, OnDataChangeListener<CoreErrorCode> onDataChangeListener)` | 接受群组申请
    `void` | `)>refuseGroupApplication(String groupId, String inviterId, String applicantId, String reason, OnDataChangeListener<Boolean> onDataChangeListener)` | 拒绝群组申请

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GroupApplicationsViewModel

          GroupApplicationsViewModel(Bundle arguments)

  - ### Method Detail

    - #### getGroupApplicationInfoListLiveData

           MutableLiveData<List<GroupApplicationInfo>> getGroupApplicationInfoListLiveData()

    - #### getGroupApplications

           void getGroupApplications(Array<GroupApplicationDirection> directions, Array<GroupApplicationStatus> status)

      获取群组申请

      Parameters:
        `directions` - 申请方向
        `status` - 申请状态

    - #### acceptGroupInvite

           void )>acceptGroupInvite(String groupId, String inviterId, OnDataChangeListener<Boolean> onDataChangeListener)

      接受群组邀请

      Parameters:
        `groupId` - 群组 ID
        `inviterId` - 邀请者 ID
        `onDataChangeListener` - 数据变化监听

    - #### refuseGroupInvite

           void )>refuseGroupInvite(String groupId, String inviterId, String reason, OnDataChangeListener<Boolean> onDataChangeListener)

      拒绝群组邀请

      Parameters:
        `groupId` - 群组 ID
        `inviterId` - 邀请者 ID
        `reason` - 拒绝原因
        `onDataChangeListener` - 数据变化监听

    - #### acceptGroupApplication

           void )>acceptGroupApplication(String groupId, String inviterId, String applicantId, OnDataChangeListener<CoreErrorCode> onDataChangeListener)

      接受群组申请

      Parameters:
        `groupId` - 群组 ID
        `inviterId` - 邀请者 ID
        `applicantId` - 申请者 ID
        `onDataChangeListener` - 数据变化监听

    - #### refuseGroupApplication

           void )>refuseGroupApplication(String groupId, String inviterId, String applicantId, String reason, OnDataChangeListener<Boolean> onDataChangeListener)

      拒绝群组申请

      Parameters:
        `groupId` - 群组 ID
        `inviterId` - 邀请者 ID
        `applicantId` - 申请者 ID
        `reason` - 拒绝原因
        `onDataChangeListener` - 数据变化监听