本文整理汇总了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());
}
示例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());
}
示例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);
}
示例4: GetStatuses
protected override IEnumerable<TwitterStatus> GetStatuses(TwitterService service, long since)
{
return since > 0L
? service.ListTweetsMentioningMeSince(since)
: service.ListTweetsMentioningMe();
}