/// <summary> /// Gets a list of friends for a given user using the specified options. /// </summary> /// <param name="screenName">The screen name of the user.</param> /// <param name="options">The options for the call.</param> public string GetListFromScreenName(string screenName, TwitterFriendsListOptions options) { // Define the query string NameValueCollection query = new NameValueCollection { { "screen_name", screenName } }; // Update the query string with the specified options if (options != null) { options.UpdateNameValueCollection(query); } // Make the call to the API return(Client.DoHttpRequestAsString("GET", "https://api.twitter.com/1.1/friends/list.json", query)); }
/// <summary> /// Gets a list of friends for a given user using the default options. /// </summary> /// <param name="userId">The ID of the user.</param> /// <param name="options">The options for the call.</param> public string GetListFromUserId(long userId, TwitterFriendsListOptions options) { // Define the query string NameValueCollection query = new NameValueCollection { { "user_id", userId.ToString(CultureInfo.InvariantCulture) } }; // Update the query string with the specified options if (options != null) { options.UpdateNameValueCollection(query); } // Make the call to the API return(Client.DoHttpRequestAsString("GET", "https://api.twitter.com/1.1/friends/list.json", query)); }
/// <summary> /// Gets a list of friends for a given user using the specified options. /// </summary> /// <param name="options">The options for the call.</param> /// <returns>Returns an instance of <see cref="SocialHttpResponse"/> representing the raw response.</returns> /// <see> /// <cref>https://dev.twitter.com/rest/reference/get/friends/list</cref> /// </see> public SocialHttpResponse GetList(TwitterFriendsListOptions options) { return(Client.DoHttpGetRequest("https://api.twitter.com/1.1/friends/list.json", options)); }
/// <summary> /// Gets a list of friends for a given user using the specified options. /// </summary> /// <param name="options">The options for the call.</param> public TwitterUserListResponse GetList(TwitterFriendsListOptions options) { return(TwitterUserListResponse.ParseResponse(Raw.GetList(options))); }
/// <summary> /// Gets a list of friends for a given user using the default options. /// </summary> /// <param name="userId">The ID of the user.</param> /// <param name="options">The options for the call.</param> public TwitterUserListResponse GetListFromUserId(long userId, TwitterFriendsListOptions options) { return(TwitterUserListResponse.ParseJson(Raw.GetListFromUserId(userId, options))); }
/// <summary> /// Gets a list of friends for a given user using the specified options. /// </summary> /// <param name="screenName">The screen name of the user.</param> /// <param name="options">The options for the call.</param> public TwitterUserListResponse GetListFromScreenName(string screenName, TwitterFriendsListOptions options) { return(TwitterUserListResponse.ParseJson(Raw.GetListFromScreenName(screenName, options))); }