agora-react-native-rtm
Version:
React Native around the Agora RTM SDKs for Android and iOS agora
141 lines (140 loc) • 4.17 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.IRtmPresenceImpl = void 0;
var _IrisRtmEngine = require("../../internal/IrisRtmEngine");
// @ts-ignore
class IRtmPresenceImpl {
whoNow(channelName, channelType, options) {
const apiType = this.getApiTypeFromWhoNow(channelName, channelType, options);
const jsonParams = {
channelName: channelName,
channelType: channelType,
options: options,
toJSON: () => {
return {
channelName: channelName,
channelType: channelType,
options: options
};
}
};
return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams);
}
getApiTypeFromWhoNow(channelName, channelType, options) {
return 'RtmPresence_whoNow_f7f61d1';
}
whereNow(userId) {
const apiType = this.getApiTypeFromWhereNow(userId);
const jsonParams = {
userId: userId,
toJSON: () => {
return {
userId: userId
};
}
};
return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams);
}
getApiTypeFromWhereNow(userId) {
return 'RtmPresence_whereNow_1fa04dd';
}
setState(channelName, channelType, items, count) {
const apiType = this.getApiTypeFromSetState(channelName, channelType, items, count);
const jsonParams = {
channelName: channelName,
channelType: channelType,
items: items,
count: count,
toJSON: () => {
return {
channelName: channelName,
channelType: channelType,
items: items,
count: count
};
}
};
return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams);
}
getApiTypeFromSetState(channelName, channelType, items, count) {
return 'RtmPresence_setState_b73723a';
}
removeState(channelName, channelType, keys, count) {
const apiType = this.getApiTypeFromRemoveState(channelName, channelType, keys, count);
const jsonParams = {
channelName: channelName,
channelType: channelType,
keys: keys,
count: count,
toJSON: () => {
return {
channelName: channelName,
channelType: channelType,
keys: keys,
count: count
};
}
};
return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams);
}
getApiTypeFromRemoveState(channelName, channelType, keys, count) {
return 'RtmPresence_removeState_d7033d8';
}
getState(channelName, channelType, userId) {
const apiType = this.getApiTypeFromGetState(channelName, channelType, userId);
const jsonParams = {
channelName: channelName,
channelType: channelType,
userId: userId,
toJSON: () => {
return {
channelName: channelName,
channelType: channelType,
userId: userId
};
}
};
return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams);
}
getApiTypeFromGetState(channelName, channelType, userId) {
return 'RtmPresence_getState_4ffa44d';
}
getOnlineUsers(channelName, channelType, options) {
const apiType = this.getApiTypeFromGetOnlineUsers(channelName, channelType, options);
const jsonParams = {
channelName: channelName,
channelType: channelType,
options: options,
toJSON: () => {
return {
channelName: channelName,
channelType: channelType,
options: options
};
}
};
return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams);
}
getApiTypeFromGetOnlineUsers(channelName, channelType, options) {
return 'RtmPresence_getOnlineUsers_ce2d8e8';
}
getUserChannels(userId) {
const apiType = this.getApiTypeFromGetUserChannels(userId);
const jsonParams = {
userId: userId,
toJSON: () => {
return {
userId: userId
};
}
};
return _IrisRtmEngine.callIrisApi.call(this, apiType, jsonParams);
}
getApiTypeFromGetUserChannels(userId) {
return 'RtmPresence_getUserChannels_1fa04dd';
}
}
exports.IRtmPresenceImpl = IRtmPresenceImpl;
//# sourceMappingURL=IAgoraRtmPresenceImpl.js.map