/// <summary>
        /// Gets a list of IDs representing the friends of a given user.
        /// </summary>
        /// <param name="screenName">The screen name of the user.</param>
        /// <param name="options">The options for the call.</param>
        public string GetIdsFromScreenName(string screenName, TwitterFriendsIdsOptions options)
        {
            // Define the query string
            NameValueCollection query = new NameValueCollection {
                { "screenName", 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/ids.json", query));
        }
        /// <summary>
        /// Gets a list of IDs representing the friends of a given user.
        /// </summary>
        /// <param name="userId">The ID of the user.</param>
        /// <param name="options">The options for the call.</param>
        public string GetIdsFromUserId(long userId, TwitterFriendsIdsOptions 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/ids.json", query));
        }
Exemplo n.º 3
0
 /// <summary>
 /// Gets a list of IDs representing the friends of a given user.
 /// </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/ids</cref>
 /// </see>
 public SocialHttpResponse GetIds(TwitterFriendsIdsOptions options)
 {
     return(Client.DoHttpGetRequest("https://api.twitter.com/1.1/friends/ids.json", options));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Gets a list of IDs representing the friends of a given user.
 /// </summary>
 /// <param name="options">The options for the call.</param>
 public TwitterIdsResponse GetIds(TwitterFriendsIdsOptions options)
 {
     return(TwitterIdsResponse.ParseResponse(Raw.GetIds(options)));
 }
 /// <summary>
 /// Gets a list of IDs representing the friends of a given user.
 /// </summary>
 /// <param name="screenName">The screen name of the user.</param>
 /// <param name="options">The options for the call.</param>
 public TwitterIdsResponse GetIdsFromScreenName(string screenName, TwitterFriendsIdsOptions options)
 {
     return(TwitterIdsResponse.ParseJson(Raw.GetIdsFromScreenName(screenName, options)));
 }
 /// <summary>
 /// Gets a list of IDs representing the friends of a given user.
 /// </summary>
 /// <param name="userId">The ID of the user.</param>
 /// <param name="options">The options for the call.</param>
 public TwitterIdsResponse GetIdsFromUserId(long userId, TwitterFriendsIdsOptions options)
 {
     return(TwitterIdsResponse.ParseJson(Raw.GetIdsFromUserId(userId, options)));
 }