IEMUserInfoManager.h 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. //
  2. // IEMUserInfoManager.h
  3. // HyphenateSDK
  4. //
  5. // Created by lixiaoming on 2021/3/17.
  6. // Copyright © 2021 easemob.com. All rights reserved.
  7. //
  8. /**
  9. * \~chinese
  10. * @header IEMUserInfoManager.h
  11. * @abstract 用户属性操作类。
  12. * @author Hyphenate
  13. * @version 3.00
  14. *
  15. * \~english
  16. * @header IEMUserInfoManager.h
  17. * @abstract The user information operation class.
  18. * @author Hyphenate
  19. * @version 3.00
  20. */
  21. #import <Foundation/Foundation.h>
  22. #import "EMUserInfo.h"
  23. #import "EMError.h"
  24. @protocol IEMUserInfoManager <NSObject>
  25. /**
  26. * \~chinese
  27. * 设置自己的所有用户属性。
  28. *
  29. * @param aUserData 要设置的用户属性信息。
  30. * @param aCompletionBlock 该方法完成调用的回调。如果该方法调用失败,会包含调用失败的原因。
  31. *
  32. * \~english
  33. * Sets all of the user's information.
  34. *
  35. * @param aUserData The user information data to set.
  36. * @param aCompletionBlock The completion block, which contains the error message if the method fails.
  37. */
  38. - (void)updateOwnUserInfo:(EMUserInfo*_Nonnull)aUserData
  39. completion:(void (^_Nullable)(EMUserInfo*_Nullable aUserInfo,EMError *_Nullable aError))aCompletionBlock;
  40. /**
  41. * \~chinese
  42. * 设置自己的指定用户属性。
  43. *
  44. * @param aValue 要设置的用户属性信息。
  45. * @param aType 要设置的用户属性类型。
  46. * @param aCompletionBlock 该方法完成调用的回调。如果该方法调用失败,会包含调用失败的原因。
  47. *
  48. * \~english
  49. * Sets a specific user information of the user.
  50. *
  51. * @param aValue The user information data to set.
  52. * @param aType The user information type to set.
  53. * @param aCompletionBlock The completion block, which contains the error message if the method fails.
  54. */
  55. - (void)updateOwnUserInfo:(NSString*_Nullable )aValue
  56. withType:(EMUserInfoType)aType
  57. completion:(void (^_Nullable )(EMUserInfo*_Nullable aUserInfo,EMError * _Nullable aError))aCompletionBlock;
  58. /**
  59. * \~chinese
  60. * 根据用户 ID 获取用户属性。
  61. *
  62. * @param aUserIds 要获取用户属性的的用户 ID 列表。
  63. * @param aCompletionBlock 该方法完成调用的回调。如果该方法调用失败,会包含调用失败的原因。
  64. *
  65. * \~english
  66. * Gets the user information by user ID.
  67. *
  68. * @param aUserIds The user ID list.
  69. * @param aCompletionBlock The completion block, which contains the error message if the method fails.
  70. */
  71. - (void)fetchUserInfoById:(NSArray<NSString*>*_Nonnull)aUserIds
  72. completion:(void (^_Nullable)(NSDictionary*_Nullable aUserDatas,EMError *_Nullable aError))aCompletionBlock;
  73. /**
  74. * \~chinese
  75. * 根据用户 ID 列表及属性类型列表获取用户指定属性。
  76. *
  77. * @param aUserIds 要获取用户属性的的用户 ID 列表。
  78. * @param aType 要获取哪些类型的用户属性列表。
  79. * @param aCompletionBlock 该方法完成调用的回调。如果该方法调用失败,会包含调用失败的原因。
  80. *
  81. * \~english
  82. * Gets the specific user information by user ID.
  83. *
  84. * @param aUserIds The user ID list.
  85. * @param aType The user information type list.
  86. * @param aCompletionBlock The completion block, which contains the error message if the method fails.
  87. */
  88. - (void)fetchUserInfoById:(NSArray<NSString*>* _Nonnull)aUserIds
  89. type:(NSArray<NSNumber*>*_Nonnull)aType
  90. completion:(void (^_Nullable)(NSDictionary*_Nullable aUserDatas,EMError *_Nullable aError))aCompletionBlock;
  91. @end