Пример #1
0
        /// <summary>
        /// 获取好友总数
        /// </summary>
        /// <param name="uid">Uid</param>
        /// <param name="direction">方向</param>
        /// <returns>好友数目</returns>
        public int FriendTotalNum(int uid, FriendDirection direction = FriendDirection.All)
        {
            var args = new Dictionary <string, string>
            {
                { "uid", uid.ToString() },
                { "direction", ((int)direction).ToString() }
            };

            return(toInt(SendArgs(args, UcFriendModelName.ModelName, UcFriendModelName.ActionTotalNum)));
        }
Пример #2
0
        /// <summary>
        /// 好友列表
        /// </summary>
        /// <param name="uid">Uid</param>
        /// <param name="page">当前页编号</param>
        /// <param name="pageSize">每页最大条目数</param>
        /// <param name="totalNum">好友总数</param>
        /// <param name="direction">方向</param>
        /// <returns></returns>
        public UcFriends UcFriendList(decimal uid, int page     = 1, int pageSize = 10, int totalNum = 10,
                                      FriendDirection direction = FriendDirection.All)
        {
            var args = new Dictionary <string, string>
            {
                { "uid", uid.ToString() },
                { "page", page.ToString() },
                { "pagesize", pageSize.ToString() },
                { "totalnum", totalNum.ToString() },
                { "direction", ((int)direction).ToString() }
            };

            return(new UcFriends(SendArgs(args, UcFriendModelName.ModelName, UcFriendModelName.ActionList)));
        }
Пример #3
0
 /// <summary>
 /// 好友列表
 /// </summary>
 /// <param name="uid">Uid</param>
 /// <param name="page">当前页编号</param>
 /// <param name="pageSize">每页最大条目数</param>
 /// <param name="totalNum">好友总数</param>
 /// <param name="direction">方向</param>
 /// <returns></returns>
 public UcFriends UcFriendList(decimal uid, int page = 1, int pageSize = 10, int totalNum = 10,
                               FriendDirection direction = FriendDirection.All)
 {
     var args = new Dictionary<string, string>
                    {
                        {"uid", uid.ToString()},
                        {"page", page.ToString()},
                        {"pagesize", pageSize.ToString()},
                        {"totalnum", totalNum.ToString()},
                        {"direction", ((int) direction).ToString()}
                    };
     return new UcFriends(SendArgs(args, UcFriendModelName.ModelName, UcFriendModelName.ActionList));
 }
Пример #4
0
 /// <summary>
 /// 获取好友总数
 /// </summary>
 /// <param name="uid">Uid</param>
 /// <param name="direction">方向</param>
 /// <returns>好友数目</returns>
 public int UcFriendTotalNum(decimal uid, FriendDirection direction = FriendDirection.All)
 {
     var args = new Dictionary<string, string>
                    {
                        {"uid", uid.ToString()},
                        {"direction", ((int) direction).ToString()}
                    };
     return toInt(SendArgs(args, UcFriendModelName.ModelName, UcFriendModelName.ActionTotalNum));
 }