/// <summary>
 /// Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="options">The options.</param>
 /// <param name="timeout">The timeout.</param>
 /// <param name="function">The function.</param>
 /// <returns></returns>
 public static IAsyncResult RetweetsOfMe(OAuthTokens tokens, RetweetsOfMeOptions options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterStatusCollection>> function)
 {
     return AsyncUtility.ExecuteAsyncMethod(tokens, options, timeout, TwitterTimeline.RetweetsOfMe, function);
 }
Exemple #2
0
 /// <summary>
 /// Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="options">The options. Leave null for defaults.</param>
 /// <returns>A <see cref="TwitterStatusCollection"/> instance.</returns>
 public static async Task<TwitterResponse<TwitterStatusCollection>> RetweetsOfMeAsync(OAuthTokens tokens, RetweetsOfMeOptions options)
 {
     return await Core.CommandPerformer.PerformAction(new Commands.RetweetsOfMeCommand(tokens, options));
 }
 /// <summary>
 /// Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="options">The options.</param>
 /// <returns>A <see cref="TwitterStatusCollection"/> instance.</returns>
 public static TwitterResponse<TwitterStatusCollection> RetweetsOfMe(OAuthTokens tokens, RetweetsOfMeOptions options)
 {
     return CommandPerformer.PerformAction(
         new Commands.RetweetsOfMeCommand(tokens, options));
 }
        /// <summary>
        /// Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="options">The options.</param>
        /// <param name="timeout">The timeout.</param>
        /// <param name="function">The function.</param>
        /// <returns></returns>
        public static IAsyncResult RetweetsOfMe(OAuthTokens tokens, RetweetsOfMeOptions options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterStatusCollection>> function)
        {
            Func<OAuthTokens, RetweetsOfMeOptions, TwitterResponse<TwitterStatusCollection>> methodToCall = TwitterTimeline.RetweetsOfMe;

            return methodToCall.BeginInvoke(
                tokens,
                options,
                result =>
                {
                    result.AsyncWaitHandle.WaitOne(timeout);
                    try
                    {
                        function(methodToCall.EndInvoke(result).ToAsyncResponse());
                    }
                    catch (Exception ex)
                    {
                        function(new TwitterAsyncResponse<TwitterStatusCollection>() { Result = RequestResult.Unknown, ExceptionThrown = ex });
                    }
                },
                null);
        }
 /// <summary>
 /// Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="options">The options.</param>
 /// <returns>A <see cref="TwitterStatusCollection"/> instance.</returns>
 public static TwitterResponse <TwitterStatusCollection> RetweetsOfMe(OAuthTokens tokens, RetweetsOfMeOptions options)
 {
     return(CommandPerformer.PerformAction(
                new Commands.RetweetsOfMeCommand(tokens, options)));
 }
Exemple #6
0
 /// <summary>
 /// Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="options">The options. Leave null for defaults.</param>
 /// <returns>A <see cref="TwitterStatusCollection"/> instance.</returns>
 public static async Task <TwitterResponse <TwitterStatusCollection> > RetweetsOfMeAsync(OAuthTokens tokens, RetweetsOfMeOptions options)
 {
     return(await Core.CommandPerformer.PerformAction(new Commands.RetweetsOfMeCommand(tokens, options)));
 }
 public string[] GetRetweet()
 {
     RetweetsOfMeOptions options = new RetweetsOfMeOptions {SinceStatusId = lastRetweetId};
     TwitterResponse<TwitterStatusCollection> response = TwitterTimeline.RetweetsOfMe(oAuthTokens, options);
     string[] values = new string[] { };
     if (response.Result == RequestResult.Success)
     {
         TwitterStatusCollection statuses = response.ResponseObject;
         List<TwitterStatus> listStatuses = new List<TwitterStatus>(statuses);
         this.lastRetweetId = listStatuses.Min(t => t.Id);
         TwitterStatus status = listStatuses.Find(t => t.Id == this.lastRetweetId);
         values = new string[] { status.CreatedDate.ToShortDateString(), status.User.Name, status.Text };
     }
     return values;
 }
Exemple #8
0
 /// <summary>
 /// Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="options">The options.</param>
 /// <param name="timeout">The timeout.</param>
 /// <param name="function">The function.</param>
 /// <returns></returns>
 public static IAsyncResult RetweetsOfMe(OAuthTokens tokens, RetweetsOfMeOptions options, TimeSpan timeout, Action <TwitterAsyncResponse <TwitterStatusCollection> > function)
 {
     return(AsyncUtility.ExecuteAsyncMethod(tokens, options, timeout, TwitterTimeline.RetweetsOfMe, function));
 }