- Android
- iOS
- JavaScript
- Flutter
- ReactNative
Get the list of likes or custom reactions for a Moment.
API Reference
/**
* get the reaction list
* @param momentId Moments post ID
* @param callback result callback
*/
void getReactionList(String momentId, JIMConst.IResultListCallback<MomentReaction> callback);
Code Example
JIM.getInstance().getMomentManager().getReactionList("momentId", new JIMConst.IResultListCallback<MomentReaction>() {
@Override
public void onSuccess(List<MomentReaction> data, boolean isFinish) {
}
@Override
public void onError(int errorCode) {
}
});
Get the list of likes or custom reactions for a Moment.
API Reference
/// get the reaction list
/// - Parameters:
/// - momentId: Moments post ID
/// - completeBlock: result callback
- (void)getReactionList:(nonnull NSString *)momentId
complete:(nullable void (^)(JErrorCode errorCode, NSArray <JMomentReaction *> * _Nullable reactionList))completeBlock;
Code Example
[JIM.shared.momentManager getReactionList:@"momentId" complete:^(JErrorCode errorCode, NSArray<JMomentReaction *> * _Nullable reactionList) {
}];
Get the list of likes or custom reactions for a Moment.
API Reference
/**
* get the reaction list
* @param momentId Moments post ID
* return reaction list
*/
Future<Result<List<MomentReaction>>> getMomentReactionList(String momentId) async
Code Example
Result<List<MomentReaction>> reactionList = await JuggleIm.instance.getMomentReactionList('momentId');
Get the list of likes or custom reactions for a Moment.
API Reference
/**
* get the reaction list
* @param momentId Moments post ID
* return Promise<MomentReaction[]>
*/
getReactionList(momentId: string): Promise<MomentReaction[]>
Code Example
import { JuggleIMMoment } from 'juggleim-rnsdk';
const reactionList = await JuggleIMMoment.getReactionList('momentId');
Get the list of likes or custom reactions for a Moment.
Parameters
| Name | Type | Required | Default | Description | Version |
|---|---|---|---|---|---|
| params | Object | Yes | - | Parameters for retrieving the reaction list | 1.9.6 |
| params.momentId | String | Yes | - | Moment ID | 1.9.6 |
Callback Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| result | Object | Reaction-list result | 1.9.6 |
| result.reactions | Array | Reaction type list. See the Reaction | 1.9.6 |
Code Example
jim.getReactions({
momentId: 'momentId',
}).then((result) => {
console.log('getReactions', result)
})