public string GetUpdatedFriends() { GetUpdatedFriendsParams actionParams = JavaScriptConvert.DeserializeObject <GetUpdatedFriendsParams>(JsonParams); List <FriendshipActionInfo> friendshipActionList = Friendship.GetFriendshipChangeLog(actionParams.Count); List <FriendsAction> actionList = new List <FriendsAction>(); foreach (FriendshipActionInfo info in friendshipActionList) { FriendsAction action = new FriendsAction(); action.Uid1 = info.Uid; action.Uid2 = info.FriendUid; action.Action = info.Action.ToString().ToLower(); actionList.Add(action); } GetUpdatedFriendsResponse gufResponse = new GetUpdatedFriendsResponse(); gufResponse.TotalNum = actionList.Count >= actionParams.Count ? actionParams.Count * 2 : actionList.Count; gufResponse.ActionList = actionList; return(GetResult(gufResponse)); }