• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Twitterizer.OptionalProperties类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Twitterizer.OptionalProperties的典型用法代码示例。如果您正苦于以下问题:C# OptionalProperties类的具体用法?C# OptionalProperties怎么用?C# OptionalProperties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OptionalProperties类属于Twitterizer命名空间,在下文中一共展示了OptionalProperties类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetStatus

        /// <summary>
        /// Gets the rate limiting status status for the authenticated user.
        /// </summary>
        /// <param name="tokens">The OAuth tokens.</param>
        /// <param name="options">The options.</param>
        /// <returns>
        /// A <see cref="TwitterRateLimitStatus"/> instance.
        /// </returns>
        public static TwitterResponse<TwitterRateLimitStatus> GetStatus(OAuthTokens tokens, OptionalProperties options)
        {
            Commands.RateLimitStatusCommand command = new Twitterizer.Commands.RateLimitStatusCommand(tokens, options);
            TwitterResponse<TwitterRateLimitStatus> result = Core.CommandPerformer.PerformAction(command);

            return result;
        }
开发者ID:haoasqui,项目名称:ONLYOFFICE-Server,代码行数:15,代码来源:TwitterRateLimitStatus.cs


示例2: Send

        /// <summary>
        /// Sends a new direct message to the specified user from the authenticating user.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="userId">The user id.</param>
        /// <param name="text">The text.</param>
        /// <param name="options">The options.</param>
        /// <param name="timeout">The timeout.</param>
        /// <param name="function">The function.</param>
        /// <returns></returns>
        public static IAsyncResult Send(OAuthTokens tokens, decimal userId, string text, OptionalProperties options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterDirectMessage>> function)
        {
            Func<OAuthTokens, decimal, string, OptionalProperties, TwitterResponse<TwitterDirectMessage>> methodToCall = TwitterDirectMessage.Send;

            return methodToCall.BeginInvoke(
                tokens,
                userId,
                text,
                options,
                result => AsyncUtility.ThreeParamsCallback(result, timeout, methodToCall, function),
                null);
        }
开发者ID:JohnSmithJS,项目名称:Twitterizer,代码行数:22,代码来源:TwitterDirectMessageAsync.cs


示例3: CheckMembership

        /// <summary>
        /// Check if a user is a member of the specified list.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="ownerUsername">The owner username.</param>
        /// <param name="listId">The list id.</param>
        /// <param name="userId">The user id.</param>
        /// <param name="options">The options.</param>
        /// <param name="timeout">The timeout.</param>
        /// <param name="function">The function.</param>
        /// <returns></returns>
        public static IAsyncResult CheckMembership(OAuthTokens tokens, string ownerUsername, string listId, decimal userId, OptionalProperties options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterUser>> function)
        {
            Func<OAuthTokens, string, string, decimal, OptionalProperties, TwitterResponse<TwitterUser>> methodToCall = TwitterList.CheckMembership;

            return methodToCall.BeginInvoke(
                tokens,
                ownerUsername,
                listId,
                userId,
                options,
                result => AsyncUtility.FourParamsCallback(result, timeout, methodToCall, function),
                null);
        }
开发者ID:Ruhowl,项目名称:Twitterizer,代码行数:24,代码来源:TwitterListAsync.cs


示例4: RequestGetDirectMessageNew

        public void RequestGetDirectMessageNew(string screen_name, string text, Action<TwitterDirectMessage> action)
        {
            OptionalProperties option = new OptionalProperties();
            option.APIBaseAddress = Whisper.Properties.Settings.Default.APIBaseAddress;

            TwitterResponse<TwitterUser> showUserResponse = TwitterUser.Show(_tokens, screen_name, option);
            if (showUserResponse.Result == RequestResult.Success)
            {
                TwitterResponse<TwitterDirectMessage> response = TwitterDirectMessage.Send(_tokens, showUserResponse.ResponseObject.Id, text, option);
                if (response.Result == RequestResult.Success)
                {
                    action(response.ResponseObject);
                }
            }
        }
开发者ID:ko-hayashi,项目名称:Whisper,代码行数:15,代码来源:TwitterUtil.cs


示例5: GetStatus

        /// <summary>
        /// Gets the rate limiting status status for the authenticated user asynchronously.
        /// </summary>
        /// <param name="tokens">The OAuth tokens.</param>
        /// <param name="options">The options.</param>
        /// <param name="timeout">The timeout.</param>
        /// <param name="function">The callback or anonymous funtion.</param>
        /// <returns>
        /// A <see cref="TwitterRateLimitStatus"/> instance.
        /// </returns>
        public static IAsyncResult GetStatus(OAuthTokens tokens, OptionalProperties options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterRateLimitStatus>> function)
        {
            Func<OAuthTokens, OptionalProperties, TwitterResponse<TwitterRateLimitStatus>> methodToCall = TwitterRateLimitStatus.GetStatus;

            return methodToCall.BeginInvoke(
                tokens,
                options,
                result => 
                {
                    result.AsyncWaitHandle.WaitOne(timeout);
                    try
                    {
                        function(methodToCall.EndInvoke(result).ToAsyncResponse());
                    }
                    catch (Exception ex)
                    {
                        function(new TwitterAsyncResponse<TwitterRateLimitStatus>() { Result = RequestResult.Unknown, ExceptionThrown = ex });
                    }
                },
                null);
        }
开发者ID:zippy1981,项目名称:Twitterizer,代码行数:31,代码来源:TwitterAccountAsync.cs


示例6: ReportUser

                /// <summary>
        /// Blocks the user and reports them for spam/abuse.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="screenName">The users screenName.</param>
        /// <param name="options">The options.</param>
        /// <param name="timeout">The timeout.</param>
        /// <param name="function">The function.</param>
        /// <returns></returns>
        public static IAsyncResult ReportUser(OAuthTokens tokens, string screenName, OptionalProperties options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterUser>> function)
        {
            Func<OAuthTokens, string, OptionalProperties, TwitterResponse<TwitterUser>> methodToCall = TwitterSpam.ReportUser;

            return methodToCall.BeginInvoke(
                tokens,
                screenName,
                options,
                result =>
                {
                    result.AsyncWaitHandle.WaitOne(timeout);
                    try
                    {
                        function(methodToCall.EndInvoke(result).ToAsyncResponse());
                    }
                    catch (Exception ex)
                    {
                        function(new TwitterAsyncResponse<TwitterUser>() { Result = RequestResult.Unknown, ExceptionThrown = ex });
                    }
                },
                null);
        }
开发者ID:smakhtin,项目名称:Twitterizer,代码行数:31,代码来源:TwitterSpamAsync.cs


示例7: Delete

        /// <summary>
        /// Deletes the saved search specified in the ID parameter as the authenticating user.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="statusId">The saved search id.</param>
        /// <param name="options">The options.</param>
        /// <param name="timeout">The timeout.</param>
        /// <param name="function">The function.</param>
        /// <returns></returns>
        public static IAsyncResult Delete(OAuthTokens tokens, decimal savedsearchId, OptionalProperties options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterSavedSearch>> function)
        {
            Func<OAuthTokens, decimal, OptionalProperties, TwitterResponse<TwitterSavedSearch>> methodToCall = TwitterSavedSearch.Delete;

            return methodToCall.BeginInvoke(
                tokens,
                savedsearchId,
                options,
                result =>
                {
                    result.AsyncWaitHandle.WaitOne(timeout);
                    try
                    {
                        function(methodToCall.EndInvoke(result).ToAsyncResponse());
                    }
                    catch (Exception ex)
                    {
                        function(new TwitterAsyncResponse<TwitterSavedSearch>() { Result = RequestResult.Unknown, ExceptionThrown = ex });
                    }
                },
                null);
        }
开发者ID:smakhtin,项目名称:Twitterizer,代码行数:31,代码来源:TwitterSavedSearchAsync.cs


示例8: CheckMembership

        /// <summary>
        /// Check if a user is a member of the specified list.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="ownerUsername">The owner username.</param>
        /// <param name="listId">The list id.</param>
        /// <param name="userId">The user id.</param>
        /// <param name="options">The options.</param>
        /// <param name="timeout">The timeout.</param>
        /// <param name="function">The function.</param>
        /// <returns></returns>
        public static IAsyncResult CheckMembership(OAuthTokens tokens, string ownerUsername, string listId, decimal userId, OptionalProperties options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterUser>> function)
        {
            Func<OAuthTokens, string, string, decimal, OptionalProperties, TwitterResponse<TwitterUser>> methodToCall = TwitterList.CheckMembership;

            return methodToCall.BeginInvoke(
                tokens,
                ownerUsername,
                listId,
                userId,
                options,
                result =>
                {
                    result.AsyncWaitHandle.WaitOne(timeout);
                    try
                    {
                        function(methodToCall.EndInvoke(result).ToAsyncResponse());
                    }
                    catch (Exception ex)
                    {
                        function(new TwitterAsyncResponse<TwitterUser>() { Result = RequestResult.Unknown, ExceptionThrown = ex });
                    }
                },
                null);
        }
开发者ID:zippy1981,项目名称:Twitterizer,代码行数:35,代码来源:TwitterListAsync.cs


示例9: PublicTimeline

        /// <summary>
        /// Returns the 20 most recent statuses, including retweets if they exist, from non-protected users. The public timeline is cached for 60 seconds.
        /// </summary>
        /// <param name="tokens">The oauth tokens.</param>
        /// <param name="options">The options.</param>
        /// <returns>A <see cref="TwitterStatusCollection"/>.</returns>
        /// <remarks></remarks>
        public static TwitterResponse<TwitterStatusCollection> PublicTimeline(OAuthTokens tokens, OptionalProperties options)
        {
            Commands.PublicTimelineCommand command = new Commands.PublicTimelineCommand(tokens, options);
            TwitterResponse<TwitterStatusCollection> result = CommandPerformer.PerformAction(command);

            return result;
        }
开发者ID:MrZweistein,项目名称:Twitterizer,代码行数:14,代码来源:TwitterTimeline.cs


示例10: NoRetweetIDs

 /// <summary>
 /// Returns a collection of IDs that the user does not want to see retweets from.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="options">The options.</param>
 /// <returns></returns>
 public static TwitterResponse<UserIdCollection> NoRetweetIDs(OAuthTokens tokens, OptionalProperties options)
 {
     Commands.NoRetweetIDsCommand command = new Commands.NoRetweetIDsCommand(tokens, options);
     return Core.CommandPerformer.PerformAction(command);
 }
开发者ID:JohnSmithJS,项目名称:Twitterizer,代码行数:11,代码来源:TwitterFriendship.cs


示例11: Show

        /// <summary>
        /// Returns detailed information about the relationship between two users.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="sourceUserName">The source user name.</param>
        /// <param name="targetUserName">The target user name.</param>
        /// <param name="options">The options.</param>
        /// <returns>A <see cref="TwitterRelationship"/> instance.</returns>
        public static TwitterResponse<TwitterRelationship> Show(OAuthTokens tokens, string sourceUserName, string targetUserName, OptionalProperties options)
        {
            Commands.ShowFriendshipCommand command = new Twitterizer.Commands.ShowFriendshipCommand(tokens, 0, sourceUserName, 0, targetUserName, options);

            return Core.CommandPerformer.PerformAction(command);
        }
开发者ID:JohnSmithJS,项目名称:Twitterizer,代码行数:14,代码来源:TwitterFriendship.cs


示例12: ShowAsync

 /// <include file='TwitterUser.xml' path='TwitterUser/Show[@name="Common"]/*'/>
 /// <include file='TwitterUser.xml' path='TwitterUser/Show[@name="ByIDWithTokensAndOptions"]/*'/>
 public static async Task<TwitterResponse<User>> ShowAsync(decimal id, OAuthTokens tokens = null, OptionalProperties options = null)
 {
     return await Core.CommandPerformer.PerformAction(new Commands.ShowUserCommand(tokens, id, string.Empty, options));
 }        
开发者ID:jorgtowers,项目名称:Twitterizer3,代码行数:6,代码来源:Users.cs


示例13: Show

        /// <include file='TwitterUser.xml' path='TwitterUser/Show[@name="Common"]/*'/>
        /// <include file='TwitterUser.xml' path='TwitterUser/Show[@name="ByUsernameWithTokensAndOptions"]/*'/>
        public static TwitterResponse<TwitterUser> Show(OAuthTokens tokens, string username, OptionalProperties options)
        {
            Commands.ShowUserCommand command = new Commands.ShowUserCommand(tokens, 0, username, options);

            return Core.CommandPerformer.PerformAction(command);
        }
开发者ID:zippy1981,项目名称:Twitterizer,代码行数:8,代码来源:TwitterUser.cs


示例14: GetStatus

 /// <summary>
 /// Gets the rate limiting status status for the authenticated user.
 /// </summary>
 /// <param name="tokens">The OAuth 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 GetStatus(OAuthTokens tokens, OptionalProperties options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterRateLimitStatus>> function)
 {
     return AsyncUtility.ExecuteAsyncMethod(tokens, options, timeout, TwitterRateLimitStatus.GetStatus, function);
 }
开发者ID:JohnSmithJS,项目名称:Twitterizer,代码行数:12,代码来源:TwitterRateLimitStatusAsync.cs


示例15: UpdateProfileImage

 /// <summary>
 /// Updates the authenticating user's profile image. Note that this method expects raw multipart data, not a URL to an image.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="imageData">The image data.</param>
 /// <param name="timeout">The timeout.</param>
 /// <param name="function">The callback or anonymous funtion.</param>
 /// <param name="options">The options.</param>
 /// <returns></returns>
 /// <remarks></remarks>
 public static IAsyncResult UpdateProfileImage(OAuthTokens tokens, byte[] imageData, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterUser>> function, OptionalProperties options = null)
 {
     return AsyncUtility.ExecuteAsyncMethod(tokens, imageData, options, timeout, TwitterAccount.UpdateProfileImage, function);
 }
开发者ID:JamesConsidine,项目名称:twintie,代码行数:14,代码来源:TwitterAccountAsync.cs


示例16: Show

 /// <summary>
 /// Returns detailed information about the relationship between two users.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="targetUserName">The target user name.</param>
 /// <param name="options">The options.</param>
 /// <param name="timeout">The timeout.</param>
 /// <param name="function">The callback function.</param>
 public static IAsyncResult Show(OAuthTokens tokens, string targetUserName, OptionalProperties options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterRelationship>> function)
 {
     return AsyncUtility.ExecuteAsyncMethod(tokens, targetUserName, options, timeout, TwitterFriendship.Show, function);
 }
开发者ID:JohnSmithJS,项目名称:Twitterizer,代码行数:12,代码来源:TwitterFriendshipAsync.cs


示例17: Show

 /// <summary>
 /// Returns a single status, with user information, specified by the id parameter.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="statusId">The status id.</param>
 /// <param name="options">The options.</param>
 /// <param name="timeout">The timeout.</param>
 /// <param name="function">The function.</param>
 /// <returns></returns>
 public static IAsyncResult Show(OAuthTokens tokens, decimal statusId, OptionalProperties options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterStatus>> function)
 {
     return AsyncUtility.ExecuteAsyncMethod(tokens, statusId, options, timeout, TwitterStatus.Show, function);
 }
开发者ID:JamesConsidine,项目名称:twintie,代码行数:13,代码来源:TwitterStatusAsync.cs


示例18: Send

        /// <summary>
        /// Sends a new direct message to the specified user from the authenticating user.
        /// </summary>
        /// <param name="tokens">The tokens.</param>
        /// <param name="userId">The user id.</param>
        /// <param name="text">The text.</param>
        /// <param name="options">The options.</param>
        /// <param name="timeout">The timeout.</param>
        /// <param name="function">The function.</param>
        /// <returns></returns>
        public static IAsyncResult Send(OAuthTokens tokens, decimal userId, string text, OptionalProperties options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterDirectMessage>> function)
        {
            Func<OAuthTokens, decimal, string, OptionalProperties, TwitterResponse<TwitterDirectMessage>> methodToCall = TwitterDirectMessage.Send;

            return methodToCall.BeginInvoke(
                tokens,
                userId,
                text,
                options,
                result =>
                {
                    result.AsyncWaitHandle.WaitOne(timeout);
                    try
                    {
                        function(methodToCall.EndInvoke(result).ToAsyncResponse());
                    }
                    catch (Exception ex)
                    {
                        function(new TwitterAsyncResponse<TwitterDirectMessage>() { Result = RequestResult.Unknown, ExceptionThrown = ex });
                    }
                },
                null);
        }
开发者ID:smakhtin,项目名称:Twitterizer,代码行数:33,代码来源:TwitterDirectMessageAsync.cs


示例19: PublicTimeline

 /// <summary>
 /// Gets the public timeline.
 /// </summary>
 /// <param name="options">The options.</param>
 /// <param name="timeout">The timeout.</param>
 /// <param name="function">The function.</param>
 /// <returns></returns>
 public static IAsyncResult PublicTimeline(OptionalProperties options, TimeSpan timeout, Action<TwitterAsyncResponse<TwitterStatusCollection>> function)
 {
     return AsyncUtility.ExecuteAsyncMethod(null, options, timeout, TwitterTimeline.PublicTimeline, function);
 }
开发者ID:JohnSmithJS,项目名称:Twitterizer,代码行数:11,代码来源:TwitterTimelineAsync.cs


示例20: Delete

 /// <summary>
 /// Allows the authenticating users to unfollow the user specified in the ID parameter.
 /// </summary>
 /// <param name="tokens">The tokens.</param>
 /// <param name="userId">The user id.</param>
 /// <param name="options">The options.</param>
 /// <returns>
 /// Returns the unfollowed user in the requested format when successful.
 /// </returns>
 public static TwitterResponse<TwitterUser> Delete(OAuthTokens tokens, decimal userId, OptionalProperties options)
 {
     Commands.DeleteFriendshipCommand command = new Commands.DeleteFriendshipCommand(tokens, userId, string.Empty, options);
     return CommandPerformer.PerformAction(command);
 }
开发者ID:JohnSmithJS,项目名称:Twitterizer,代码行数:14,代码来源:TwitterFriendship.cs



注:本文中的Twitterizer.OptionalProperties类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Data.UCDbContext类代码示例发布时间:2022-05-26
下一篇:
C# Twitterizer.OAuthTokens类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap