本文整理汇总了C#中IUserSession.GetRetweetsOfMe方法的典型用法代码示例。如果您正苦于以下问题:C# IUserSession.GetRetweetsOfMe方法的具体用法?C# IUserSession.GetRetweetsOfMe怎么用?C# IUserSession.GetRetweetsOfMe使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IUserSession
的用法示例。
在下文中一共展示了IUserSession.GetRetweetsOfMe方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoTimelineTest
//.........这里部分代码省略.........
tweet.User.ScreenName, tweet.Text));
if (tweet.Id > largestid)
largestid = tweet.Id;
if (tweet.Id < smallestid)
smallestid = tweet.Id;
}
}
ConsoleOutput.PrintMessage(
String.Format(" LargestID: {0} // SmallestID: {1}", largestid, smallestid));
ConsoleOutput.PrintMessage("Now Updating Home Timeline, should show older messages");
var timeline42 = await session.GetHomeTimeline(maxId: smallestid, count: 10);
if (timeline42.OK)
{
foreach (var tweet in timeline42)
{
ConsoleOutput.PrintMessage(
String.Format("ID: {0} // From: {1} // Message: {2}", tweet.Id,
tweet.User.ScreenName, tweet.Text));
if (tweet.Id > largestid)
largestid = tweet.Id;
if (tweet.Id < smallestid)
smallestid = tweet.Id;
}
}
else
successStatus = false;
}
}
// 5
if (testSeq.Contains(5))
{
ConsoleOutput.PrintMessage("7.5 Timeline\\GetRetweetsOfMe", ConsoleColor.Gray);
var timeline5 = await session.GetRetweetsOfMe(count: 30);
if (timeline5.OK)
{
foreach (var tweet in timeline5)
{
ConsoleOutput.PrintMessage(
String.Format("From: {0} // Message: {1}", tweet.User.ScreenName, tweet.Text));
}
}
else
successStatus = false;
}
// 6
if (testSeq.Contains(6))
{
ConsoleOutput.PrintMessage(
"7.6 Timeline\\GetHomeTimeline - Paging Backward, getting older tweets with ID mechanism",
ConsoleColor.Gray);
long smallestid = 0;
long largestid = 0;
int howManyToGet = 100;
int pagingSize = 10;
do
{
var timeline6 = await session.GetHomeTimeline(count: pagingSize, maxId: smallestid);
if (timeline6.OK)
{
smallestid = timeline6.ToList()[0].Id; // grab the first for comparator
foreach (var tweet in timeline6)
{
ConsoleOutput.PrintMessage(
String.Format("ID: {0} // From: {1} // Message: {2}", tweet.Id,
tweet.User.ScreenName,
tweet.Text));
if (tweet.Id < smallestid) smallestid = tweet.Id;
if (tweet.Id > largestid) largestid = tweet.Id;
howManyToGet--;
}
ConsoleOutput.PrintMessage(
String.Format("SmallestID: {0}", smallestid),
ConsoleColor.Cyan);
}
else
{
successStatus = false;
TwitterLiveFireUserAuth.PrintTwitterErrors(timeline6.twitterControlMessage);
break;
}
} while (howManyToGet > 0);
}
}
catch (Exception e)
{
ConsoleOutput.PrintError(e.ToString());
return false;
}
return successStatus;
}