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); }
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); }
public void CreateGroup(GroupContent content, Action <Group> success, Action <GetSocialError> failure) { CallAsync("Communities.createGroup", GSJson.Serialize(content), success, failure); }