Ejemplo n.º 1
0
        /// <summary>
        /// 获取单个群信息
        /// </summary>
        /// <param name="ClusterNumber">群号码</param>
        /// <returns>群信息</returns>
        private RetJsonData Action_GetClusterInfo(UInt32 ClusterNumber)
        {
            // 获取群信息
            Sdk_ClusterInfo ClusterInfo = ApiPlugin.GetClusterInfo(ClusterNumber);

            // 查找失败
            if (ClusterInfo == null)
            {
                return(new RetJsonData()
                {
                    Code = 404, Msg = "获取失败"
                });
            }

            // 结构对象
            Hashtable retData = new Hashtable()
            {
                { "ClusterNum", ClusterInfo.ClusterNum },
                { "ClusterName", ClusterInfo.ClusterName },
                { "Description", ClusterInfo.Description },
                { "Notice", ClusterInfo.Notice },
                { "Creator", ClusterInfo.Creator },
                { "NowNum", ClusterInfo.NowNum }
            };

            return(new RetJsonData()
            {
                Data = retData
            });
        }