Beispiel #1
0
        /// <summary>
        /// Create a community
        /// </summary>
        /// <param name="communityShortName">Short name of the community</param>
        /// <param name="parentCommunityShortName">Parent community short name of the community</param>
        /// <param name="administratorUserId">Admin ID of the community</param>
        public void VincularComunidadPadre(string communityShortName, string parentCommunityShortName, Guid administratorUserId)
        {
            LinkParentCommunityModel linkparent = new LinkParentCommunityModel()
            {
                short_name = communityShortName, parent_community_short_name = parentCommunityShortName, admin_id = administratorUserId
            };

            LinkParentCommunity(linkparent);
        }
Beispiel #2
0
        /// <summary>
        /// Create a community
        /// </summary>
        /// <param name="linkParentCommunity">Community model</param>
        public void LinkParentCommunity(LinkParentCommunityModel linkParentCommunity)
        {
            string json = null;

            try
            {
                string url = $"{ApiUrl}/community/link-parent-community";

                WebRequestPostWithJsonObject(url, linkParentCommunity);

                Log.Debug($"Community created {json}");
            }
            catch (Exception ex)
            {
                Log.Error($"Error creating community {json}: \r\n{ex.Message}");
                throw;
            }
        }