/// <summary> /// Returns a collection of IDs for every protected user for whom the authenticating user has a pending follow request. /// </summary> /// <param name="tokens">The tokens.</param> /// <param name="options">The options.</param> /// <returns></returns> public static TwitterResponse<TwitterCursorPagedIdCollection> OutgoingRequests(OAuthTokens tokens, OutgoingFriendshipsOptions options) { Commands.OutgoingFriendshipsCommand command = new Commands.OutgoingFriendshipsCommand(tokens, options); return Core.CommandPerformer.PerformAction(command); }
/// <summary> /// Returns a collection of IDs for every protected user for whom the authenticating user has a pending follow request. /// </summary> /// <param name="tokens">The tokens.</param> /// <param name="options">The options.</param> /// <returns></returns> public static TwitterResponse <TwitterCursorPagedIdCollection> OutgoingRequests(OAuthTokens tokens, OutgoingFriendshipsOptions options) { Commands.OutgoingFriendshipsCommand command = new Commands.OutgoingFriendshipsCommand(tokens, options); return(Core.CommandPerformer.PerformAction(command)); }
/// <summary> /// Returns a collection of IDs for every protected user for whom the authenticating user has a pending follow request. /// </summary> /// <param name="tokens">The tokens.</param> /// <param name="timeout">The timeout.</param> /// <param name="options">The options.</param> /// <param name="function">The function.</param> /// <returns></returns> public static IAsyncResult OutgoingRequests(OAuthTokens tokens, OutgoingFriendshipsOptions options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterCursorPagedIdCollection>> function) { return AsyncUtility.ExecuteAsyncMethod(tokens, options, timeout, TwitterFriendship.OutgoingRequests, function); }
/// <summary> /// Returns a collection of IDs for every protected user for whom the authenticating user has a pending follow request. /// </summary> /// <param name="tokens">The tokens.</param> /// <param name="options">The options.</param> /// <returns></returns> public static async Task<TwitterResponse<TwitterCursorPagedIdCollection>> OutgoingRequestsAsync(OAuthTokens tokens, OutgoingFriendshipsOptions options = null) { return await Core.CommandPerformer.PerformAction(new Commands.OutgoingFriendshipsCommand(tokens, options)); }
/// <summary> /// Returns a collection of IDs for every protected user for whom the authenticating user has a pending follow request. /// </summary> /// <param name="tokens">The tokens.</param> /// <param name="timeout">The timeout.</param> /// <param name="options">The options.</param> /// <param name="function">The function.</param> /// <returns></returns> public static IAsyncResult OutgoingRequests(OAuthTokens tokens, OutgoingFriendshipsOptions options, TimeSpan timeout, Action <TwitterAsyncResponse <TwitterCursorPagedIdCollection> > function) { return(AsyncUtility.ExecuteAsyncMethod(tokens, options, timeout, TwitterFriendship.OutgoingRequests, function)); }
/// <summary> /// Returns a collection of IDs for every protected user for whom the authenticating user has a pending follow request. /// </summary> /// <param name="tokens">The tokens.</param> /// <param name="options">The options.</param> /// <returns></returns> public static async Task <TwitterResponse <TwitterCursorPagedIdCollection> > OutgoingRequestsAsync(OAuthTokens tokens, OutgoingFriendshipsOptions options = null) { return(await Core.CommandPerformer.PerformAction(new Commands.OutgoingFriendshipsCommand(tokens, options))); }
/// <summary> /// Returns a collection of IDs for every protected user for whom the authenticating user has a pending follow request. /// </summary> /// <param name="tokens">The tokens.</param> /// <param name="timeout">The timeout.</param> /// <param name="function">The function.</param> /// <returns></returns> public static IAsyncResult OutgoingRequests(OAuthTokens tokens, OutgoingFriendshipsOptions options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterCursorPagedIdCollection>> function) { Func<OAuthTokens, OutgoingFriendshipsOptions, TwitterResponse<TwitterCursorPagedIdCollection>> methodToCall = TwitterFriendship.OutgoingRequests; return methodToCall.BeginInvoke( tokens, options, result => { result.AsyncWaitHandle.WaitOne(timeout); try { function(methodToCall.EndInvoke(result).ToAsyncResponse()); } catch (Exception ex) { function(new TwitterAsyncResponse<TwitterCursorPagedIdCollection>() { Result = RequestResult.Unknown, ExceptionThrown = ex }); } }, null); }