Example #1
0
 public static UpdateActivityRequest ToUpdateRpc(this ActivityContent content, string lang, string activityId)
 {
     return(new UpdateActivityRequest
     {
         ActivityId = activityId,
         Properties = content.Properties,
         Content = new Dictionary <string, AFContent>
         {
             { lang, new AFContent
               {
                   Text = content.Text,
                   Button = content.Button?.ToRpc(),
                   Attachments = content.Attachments.ConvertAll(it => it.ToRpc())
               } }
         }
     });
 }
Example #2
0
 public static CreateActivityRequest ToRpc(this ActivityContent content, string lang, PostActivityTarget target)
 {
     return(new CreateActivityRequest
     {
         Target = target.Ids.ToRpc(),
         Properties = content.Properties,
         Content = new Dictionary <string, AFContent>
         {
             { lang, new AFContent
               {
                   Text = content.Text,
                   Button = content.Button?.ToRpc(),
                   Attachments = content.Attachments.ConvertAll(it => it.ToRpc())
               } }
         }
     });
 }
Example #3
0
 public static void UpdateActivity(string id, ActivityContent content, Action <Activity> onSuccess,
                                   Action <GetSocialError> onFailure)
 {
     GetSocialFactory.Bridge.UpdateActivity(id, content, onSuccess, onFailure);
 }
Example #4
0
 public static void PostActivity(ActivityContent content, PostActivityTarget target, Action <Activity> onSuccess,
                                 Action <GetSocialError> onFailure)
 {
     GetSocialFactory.Bridge.PostActivity(content, target, onSuccess, onFailure);
 }
Example #5
0
 public void UpdateActivity(string id, ActivityContent content, Action <Activity> onSuccess, Action <GetSocialError> onFailure)
 {
     CallAsync("Communities.updateActivity", GSJson.Serialize(new UpdateActivityBody {
         Target = id, Content = content
     }), onSuccess, onFailure);
 }
Example #6
0
 public void PostActivity(ActivityContent content, PostActivityTarget target, Action <Activity> onSuccess, Action <GetSocialError> onFailure)
 {
     CallAsync("Communities.postActivity", GSJson.Serialize(new PostActivityBody {
         Target = target, Content = content
     }), onSuccess, onFailure);
 }