Exemple #1
0
 public void PostActivityToFeed(string feed, ActivityPostContent content, Action <ActivityPost> onSuccess,
                                Action <GetSocialError> onFailure)
 {
     _gs_postActivityToFeed(feed, content.ToJson(),
                            Callbacks.GetActivityPost, onSuccess.GetPointer(),
                            Callbacks.FailureCallback, onFailure.GetPointer());
 }
Exemple #2
0
 public void PostCommentToActivity(string activityId, ActivityPostContent comment, Action <ActivityPost> onSuccess,
                                   Action <GetSocialError> onFailure)
 {
     _gs_postCommentToActivity(activityId, comment.ToJson(),
                               Callbacks.GetActivityPost, onSuccess.GetPointer(),
                               Callbacks.FailureCallback, onFailure.GetPointer());
 }
        public void PostCommentToActivity(string activityId, ActivityPostContent comment, Action <ActivityPost> onSuccess, Action <GetSocialError> onFailure)
        {
            var rpcContent = comment.ToRpcModel();

            LogRequest("postComment", string.Format("activityId: {0}, content: {1}", activityId, rpcContent));
            WithHadesClient(client =>
            {
                var response = client.postComment(SessionId, activityId, rpcContent);
                Ui(() =>
                {
                    LogResponse("postComment", response);
                    onSuccess.SafeCall(response.FromRpcModel());
                });
            }, onFailure);
        }
        public void PostActivityToFeed(string feed, ActivityPostContent content, Action <ActivityPost> onSuccess, Action <GetSocialError> onFailure)
        {
            var rpcContent = content.ToRpcModel();

            LogRequest("postActivity", string.Format("feed: {0}, content: {1}", feed, rpcContent));
            WithHadesClient(client =>
            {
                var response = client.postActivity(SessionId, GetFeedName(feed), rpcContent);
                Ui(() =>
                {
                    LogResponse("postActivity", response);
                    onSuccess.SafeCall(response.FromRpcModel());
                });
            }, onFailure);
        }
        public static THActivityPostContent ToRpcModel(this ActivityPostContent content)
        {
            var media = content._mediaAttachment;

            if (!media.IsSupported())
            {
                GetSocialLogs.W("Uploading Texture2D or video is not supported in Editor yet");
            }
            return(new THActivityPostContent
            {
                Text = content._text,
                ButtonTitle = content._buttonTitle,
                ButtonAction = content._buttonAction,
                Language = GetSocial.GetLanguage(),
                ImageUrl = media.GetImageUrl(),
                VideoUrl = media.GetVideoUrl(),
                Action = content._action.ToRpcModel()
            });
        }
 public void PostCommentToActivity(string activityId, ActivityPostContent comment, Action <ActivityPost> onSuccess,
                                   Action <GetSocialError> onFailure)
 {
     DebugUtils.LogMethodCall(MethodBase.GetCurrentMethod(), activityId, comment, onSuccess, onFailure);
 }
 public void PostActivityToFeed(string feed, ActivityPostContent content, Action <ActivityPost> onSuccess, Action <GetSocialError> onFailure)
 {
     DebugUtils.LogMethodCall(MethodBase.GetCurrentMethod(), content, onSuccess, onFailure);
 }
Exemple #8
0
 public void PostCommentToActivity(string activityId, ActivityPostContent comment, Action <ActivityPost> onSuccess,
                                   Action <GetSocialError> onFailure)
 {
     _getSocial.CallStatic("postCommentToActivity", activityId, comment.ToAjo(), new CallbackProxy <ActivityPost>(onSuccess, onFailure));
 }
Exemple #9
0
 public void PostActivityToFeed(string feed, ActivityPostContent content, Action <ActivityPost> onSuccess, Action <GetSocialError> onFailure)
 {
     _getSocial.CallStatic("postActivityToFeed", feed, content.ToAjo(), new CallbackProxy <ActivityPost>(onSuccess, onFailure));
 }