public static GetNotificationsRequest ToRPC(this NotificationsQuery query) { return(new GetNotificationsRequest { Statuses = query.Statuses, Actions = query.Actions, Types = query.Types }); }
public static THNotificationsQuery ToRpcModel(this NotificationsQuery query) { return(new THNotificationsQuery { Limit = query._limit, Older = query._filter == NotificationsQuery.Filter.Older ? query._notificationId : null, Newer = query._filter == NotificationsQuery.Filter.Newer ? query._notificationId : null, Statuses = query._statuses.ToList(), Types = query._types.ToList(), Actions = query._actions.ToList() }); }
public void GetNotifications(NotificationsQuery query, Action <List <Notification> > onSuccess, Action <GetSocialError> onError) { var rpcQuery = query.ToRpcModel(); LogRequest("getNotifications", rpcQuery); WithHadesClient(client => { var response = client.getNotificationsList(SessionId, rpcQuery); Ui(() => { LogResponse("getNotifications", response.ToDebugString()); onSuccess.SafeCall(response.ConvertAll(notification => notification.FromRpcModel())); }); }, onError); }
public void GetNotifications(NotificationsQuery query, Action <List <Notification> > onSuccess, Action <GetSocialError> onError) { DebugUtils.LogMethodCall(MethodBase.GetCurrentMethod(), query, onSuccess, onError); }
/// <summary> /// Get a number of notifications for current user. /// </summary> /// <param name="query">Notifications count query.</param> /// <param name="success">Callback to be invoked with a number of notifications.</param> /// <param name="failure">Called if operation failed.</param> public static void Count(NotificationsQuery query, Action <int> success, Action <GetSocialError> failure) { GetSocialFactory.Bridge.CountNotifications(query, success, failure); }
public void CountNotifications(NotificationsQuery query, Action <int> success, Action <GetSocialError> failure) { CallAsync("Notifications.count", GSJson.Serialize(query), success, failure); }
public void GetNotifications(NotificationsQuery query, Action <List <Notification> > onSuccess, Action <GetSocialError> onError) { _gs_getNotifications(query.ToJson(), Callbacks.GetNotificationsCallback, onSuccess.GetPointer(), Callbacks.FailureCallback, onError.GetPointer()); }
public void GetNotifications(NotificationsQuery query, Action <List <Notification> > onSuccess, Action <GetSocialError> onError) { _user.CallStatic("getNotifications", query.ToAjo(), new ListCallbackProxy <Notification>(onSuccess, onError)); }