Esempio n. 1
0
        public static UpdateGroupRequest ToUpdateRPC(this GroupContent content)
        {
            var request = new UpdateGroupRequest();

            request.Id = content.Id;
            // FIXME: use proper locale
            request.Title = new Dictionary <string, string> {
                { "en", content.Title }
            };
            request.GroupDescription = new Dictionary <string, string> {
                { "en", content.Description }
            };
            request.AvatarUrl      = content.AvatarUrl;
            request.IsDiscoverable = content.IsDiscoverable;
            request.IsPrivate      = content.IsPrivate;
            var permissions = new Dictionary <int, int>();

            foreach (var entry in content.Permissions)
            {
                permissions[(int)entry.Key] = (int)entry.Value;
            }
            request.Permissions = permissions;
            request.Properties  = content.Properties;
            return(request);
        }
Esempio n. 2
0
 public void UpdateGroup(string groupId, GroupContent content, Action <Group> success, Action <GetSocialError> failure)
 {
     CallAsync("Communities.updateGroup", GSJson.Serialize(new UpdateGroupBody {
         GroupId = groupId, Content = content
     }), success, failure);
 }
Esempio n. 3
0
 public void CreateGroup(GroupContent content, Action <Group> success, Action <GetSocialError> failure)
 {
     CallAsync("Communities.createGroup", GSJson.Serialize(content), success, failure);
 }