/// <summary> /// Requests the friends of the encoded user id or if none supplied the current logged in user /// </summary> /// <param name="encodedUserId">encoded user id, can be null for current logged in user</param> /// <returns>List of <see cref="UserProfile"/></returns> public async Task <List <UserProfile> > GetFriendsAsync(string encodedUserId = default(string)) { string apiCall = FitbitClientHelperExtensions.ToFullUrl("/1/user/{0}/friends.json", encodedUserId); HttpResponseMessage response = await HttpClient.GetAsync(apiCall); await HandleResponse(response); string responseBody = await response.Content.ReadAsStringAsync(); var serializer = new JsonDotNetSerializer(); return(serializer.GetFriends(responseBody)); }