public async static Task<FollowersObject> GetFollowersOfUser(int userId) { dynamic dynFollowersObj = await GetResultFromURL(USER_PATH + userId + "/followers.json"); FollowersObject followersObj = new FollowersObject(); followersObj.Count = dynFollowersObj.count; ObservableCollection<FollowObject> followers = new ObservableCollection<FollowObject>(); foreach (var follower in dynFollowersObj.followers) { followers.Add(FollowObject.fromDynamic(follower)); } followersObj.Followers = followers; return followersObj; }
public async static Task <FollowersObject> GetFollowersOfUser(int userId) { dynamic dynFollowersObj = await GetResultFromURL(USER_PATH + userId + "/followers.json"); FollowersObject followersObj = new FollowersObject(); followersObj.Count = dynFollowersObj.count; ObservableCollection <FollowObject> followers = new ObservableCollection <FollowObject>(); foreach (var follower in dynFollowersObj.followers) { followers.Add(FollowObject.fromDynamic(follower)); } followersObj.Followers = followers; return(followersObj); }