Ejemplo n.º 1
0
 /// <summary>
 /// List the lists of the specified user. Private lists will be included if the authenticated users is the same as the user who's lists are being returned.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="options">The options. Leave null for defaults.</param>
 /// <returns>
 /// A <see cref="TwitterListCollection"/> instance.
 /// </returns>
 public static async Task <TwitterResponse <TwitterListCollection> > GetListsAsync(OAuthTokens tokens, GetListsOptions options = null)
 {
     return(await Core.CommandPerformer.PerformAction(new Twitterizer.Commands.GetListsCommand(tokens, options)));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// List the lists of the specified user. Private lists will be included if the authenticated users is the same as the user who's lists are being returned.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="username">The username.</param>
        /// <param name="options">The options.</param>
        /// <param name="timeout">The timeout.</param>
        /// <param name="function">The function.</param>
        /// <returns></returns>
        public static IAsyncResult GetLists(OAuthTokens tokens, string username, GetListsOptions options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterListCollection>> function)
        {
            Func<OAuthTokens, string, GetListsOptions, TwitterResponse<TwitterListCollection>> methodToCall = TwitterList.GetLists;

            return methodToCall.BeginInvoke(
                tokens,
                username,
                options,
                result =>
                {
                    result.AsyncWaitHandle.WaitOne(timeout);
                    try
                    {
                        function(methodToCall.EndInvoke(result).ToAsyncResponse());
                    }
                    catch (Exception ex)
                    {
                        function(new TwitterAsyncResponse<TwitterListCollection>() { Result = RequestResult.Unknown, ExceptionThrown = ex });
                    }
                },
                null);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// List the lists of the specified user. Private lists will be included if the authenticated users is the same as the user who's lists are being returned.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="options">The options.</param>
        /// <returns>
        /// A <see cref="TwitterListCollection"/> instance.
        /// </returns>
        public static TwitterResponse<TwitterListCollection> GetLists(OAuthTokens tokens, GetListsOptions options = null)
        {
            Commands.GetListsCommand command = new Twitterizer.Commands.GetListsCommand(tokens, options);

            return Core.CommandPerformer.PerformAction(command);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// List the lists of the specified user. Private lists will be included if the authenticated users is the same as the user who's lists are being returned.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="options">The options. Leave null for defaults.</param>
 /// <returns>
 /// A <see cref="TwitterListCollection"/> instance.
 /// </returns>
 public static async Task<TwitterResponse<TwitterListCollection>> GetListsAsync(OAuthTokens tokens, GetListsOptions options = null)
 {
     return await Core.CommandPerformer.PerformAction(new Twitterizer.Commands.GetListsCommand(tokens, options));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// List the lists of the specified user. Private lists will be included if the authenticated users is the same as the user who's lists are being returned.
 /// </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 GetLists(OAuthTokens tokens, GetListsOptions options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterListCollection>> function)
 {
     return AsyncUtility.ExecuteAsyncMethod(tokens, options, timeout, TwitterList.GetLists, function);
 }
Ejemplo n.º 6
0
        /// <summary>
        /// List the lists of the specified user. Private lists will be included if the authenticated users is the same as the user who's lists are being returned.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="options">The options.</param>
        /// <returns>
        /// A <see cref="TwitterListCollection"/> instance.
        /// </returns>
        public static TwitterResponse <TwitterListCollection> GetLists(OAuthTokens tokens, GetListsOptions options)
        {
            Commands.GetListsCommand command = new Twitterizer.Commands.GetListsCommand(tokens, options);

            return(Core.CommandPerformer.PerformAction(command));
        }
Ejemplo n.º 7
0
 /// <summary>
 /// List the lists of the specified user. Private lists will be included if the authenticated users is the same as the user who's lists are being returned.
 /// </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 GetLists(OAuthTokens tokens, GetListsOptions options, TimeSpan timeout, Action <TwitterAsyncResponse <TwitterListCollection> > function)
 {
     return(AsyncUtility.ExecuteAsyncMethod(tokens, options, timeout, TwitterList.GetLists, function));
 }
Ejemplo n.º 8
0
 public static TwitterResponse<TwitterListCollection> GetLists(OAuthTokens tokens, string username, GetListsOptions options)
 {
     return GetLists(tokens, options);
 }