本文整理汇总了C#中BoxSocial.Internals.User.GetFriends方法的典型用法代码示例。如果您正苦于以下问题:C# User.GetFriends方法的具体用法?C# User.GetFriends怎么用?C# User.GetFriends使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BoxSocial.Internals.User
的用法示例。
在下文中一共展示了User.GetFriends方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExecuteCall
public override void ExecuteCall(string callName)
{
switch (callName)
{
case "settings/me":
core.Response.WriteObject(core.Session.LoggedInMember.UserSettings);
break;
case "info/me":
core.Response.WriteObject(core.Session.LoggedInMember.UserInfo);
break;
case "profile":
{
long userId = core.Functions.RequestLong("id", core.Session.LoggedInMember.Id);
User user = new User(core, userId);
UserProfile up = user.Profile;
if (user.Access.Can("VIEW"))
{
core.Response.WriteObject(user);
}
else
{
}
}
break;
case "friends":
{
long userId = core.Functions.RequestLong("id", core.Session.LoggedInMember.Id);
int page = core.Functions.RequestInt("page", 1);
int perPage = Math.Max(Math.Min(20, core.Functions.RequestInt("per_page", 18)), 1);
string filter = core.Http["filter"];
User user = new User(core, userId);
if (user.Access.Can("VIEW_FRIENDS"))
{
List<Friend> friends = user.GetFriends(page, perPage, filter);
core.Response.WriteObject(friends);
}
}
break;
case "status_post":
string message = core.Http.Form["message"];
StatusMessage newMessage = StatusFeed.SaveMessage(core, message);
core.Response.WriteObject(newMessage);
break;
case "status":
{
long statusId = core.Functions.RequestLong("id", 0);
if (statusId > 0)
{
try
{
StatusMessage status = new StatusMessage(core, statusId);
core.Response.WriteObject(status);
}
catch (InvalidStatusMessageException)
{
}
}
}
break;
case "feed":
{
long ownerId = core.Functions.RequestLong("owner_id", core.Session.LoggedInMember.Id);
long ownerTypeId = core.Functions.RequestLong("owner_type_id", core.Session.LoggedInMember.ItemKey.TypeId);
User user = new User(core, ownerId);
CombinedFeed.ShowMore(core, user);
}
break;
}
}