当前位置: 首页>>代码示例>>C#>>正文


C# TwitterService.ListTweetsMentioningMe方法代码示例

本文整理汇总了C#中TwitterService.ListTweetsMentioningMe方法的典型用法代码示例。如果您正苦于以下问题:C# TwitterService.ListTweetsMentioningMe方法的具体用法?C# TwitterService.ListTweetsMentioningMe怎么用?C# TwitterService.ListTweetsMentioningMe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TwitterService的用法示例。


在下文中一共展示了TwitterService.ListTweetsMentioningMe方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Can_make_protected_resource_request_with_access_token

        public void Can_make_protected_resource_request_with_access_token()
        {
            var service = new TwitterService(_consumerKey, _consumerSecret);
            var request = service.GetRequestToken();

            AssertResultWas(service, HttpStatusCode.OK);
            Assert.NotNull(request);

            var uri = service.GetAuthorizationUri(request);
            Process.Start(uri.ToString());

            Console.WriteLine("Press the any key when you have confirmation of your code transmission.");
            var verifier = "1234567"; // <-- Debugger breakpoint and edit with the actual verifier

            var access = service.GetAccessToken(request, verifier);
            AssertResultWas(service, HttpStatusCode.OK);
            Assert.IsNotNull(access);

            service.AuthenticateWith(access.Token, access.TokenSecret);
            var mentions = service.ListTweetsMentioningMe(new ListTweetsMentioningMeOptions());
            Assert.IsNotNull(mentions);
            Assert.AreEqual(20, mentions.Count());
        }
开发者ID:PetroProts,项目名称:tweetsharp,代码行数:23,代码来源:TwitterServiceTests.OAuth.cs

示例2: Can_get_mentions_and_fail_due_to_unauthorized_request

        public void Can_get_mentions_and_fail_due_to_unauthorized_request()
        {
            var service = new TwitterService();
            var mentions = service.ListTweetsMentioningMe(new ListTweetsMentioningMeOptions());

            Assert.AreEqual(HttpStatusCode.BadRequest, service.Response.StatusCode);
            Assert.IsNull(mentions);

            var error = service.Response.Error;
            Assert.IsNotNull(error);
            Assert.IsNotNullOrEmpty(error.Message);
            Trace.WriteLine(error.ToString());
        }
开发者ID:braahyan,项目名称:tweetsharp,代码行数:13,代码来源:TwitterServiceTests.cs

示例3: Can_get_mentions_and_fail_in_xml

        public void Can_get_mentions_and_fail_in_xml()
        {
            var service = new TwitterService(_consumerKey, _consumerSecret) { Format = TwitterServiceFormat.Xml };
            var mentions = service.ListTweetsMentioningMe();

            Assert.AreEqual(HttpStatusCode.Unauthorized, service.Response.StatusCode);
            Assert.IsTrue(mentions.Count() == 1);

            var error = service.Deserialize<TwitterError>(mentions.First());
            Assert.IsNotNull(error);
            Assert.IsNotNullOrEmpty(error.Request);
            Assert.IsNotNullOrEmpty(error.ErrorMessage);
        }
开发者ID:nadeemmar,项目名称:tweetsharp,代码行数:13,代码来源:TwitterServiceTests.cs

示例4: GetStatuses

 protected override IEnumerable<TwitterStatus> GetStatuses(TwitterService service, long since)
 {
     return since > 0L
                ? service.ListTweetsMentioningMeSince(since)
                : service.ListTweetsMentioningMe();
 }
开发者ID:GraemeF,项目名称:Twiddler,代码行数:6,代码来源:MentionsTweetRequester.cs


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