本文整理汇总了C#中IUserSession.GetSuggestedLists方法的典型用法代码示例。如果您正苦于以下问题:C# IUserSession.GetSuggestedLists方法的具体用法?C# IUserSession.GetSuggestedLists怎么用?C# IUserSession.GetSuggestedLists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IUserSession
的用法示例。
在下文中一共展示了IUserSession.GetSuggestedLists方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoSuggestedUsersTest
public async Task<bool> DoSuggestedUsersTest(IUserSession session, List<int> testSeq)
{
var successStatus = true;
var suggestedSlug = "";
try
{
// 1
if (testSeq.Contains(1))
{
//-33.884097,151.134796
ConsoleOutput.PrintMessage("9.1 SuggestedUsers\\GetSuggestedLists", ConsoleColor.Gray);
var suggs1 = await session.GetSuggestedLists();
if (suggs1.OK)
{
foreach (var sgg in suggs1)
{
ConsoleOutput.PrintMessage(
String.Format("Name: {0} // Slug: {1}", sgg.Name, sgg.Slug));
suggestedSlug = sgg.Slug;
}
}
else
successStatus = false;
}
// 2
if (testSeq.Contains(2))
{
//-33.884097,151.134796
ConsoleOutput.PrintMessage("9.2 SuggestedUsers\\GetSuggestedUsers", ConsoleColor.Gray);
var suggs2 = await session.GetSuggestedUsers(slug:suggestedSlug);
if (suggs2.OK)
{
foreach (var sgu in suggs2.Users)
{
ConsoleOutput.PrintMessage(
String.Format("UserID: {0} // ScreenName: {1}",sgu.UserId, sgu.ScreenName));
}
}
else
successStatus = false;
}
}
catch (Exception e)
{
ConsoleOutput.PrintError(e.ToString());
return false;
}
return successStatus;
}