RuyiNetFriendService Class |
[This is preliminary documentation and is subject to change.]
Namespace: Ruyi.SDK.Online
public class RuyiNetFriendService : RuyiNetService
The RuyiNetFriendService type exposes the following members.
Name | Description | |
---|---|---|
AcceptFriendInvitation |
Accepts a friend invitation and adds the player to the friend list.
| |
AddFriend | Obsolete. | |
FindUserByExactName |
Attempts to find a user by exact name.
| |
FindUsersBySubstrName |
Attempts to find users with names containing the substring.
| |
GetProfile | Obsolete. | |
GetProfiles | Obsolete. | |
GetSummaryDataForFriends |
Returns the summary data for a player's friends.
| |
GetSummaryDataForPlayerId |
Returns the summary data for players.
| |
GetSummaryDataForPlayerIds |
Returns the summary data for players.
| |
GetSummaryDataForRecentlyMetPlayers |
Returns the summary data for a player's friends.
| |
GetUsersOnlineStatus |
Retrieve the online status of a list of users.
| |
ListFriendInvitationsRecieved |
Returns a list of invitations sent to this player.
| |
ListFriendInvitationsSent |
Returns a list of invitations the player has sent.
| |
ListFriends |
Returns a list of the user's friends.
| |
ReadFriendEntity |
Read an entity attached to a friend.
| |
ReadFriendsEntities |
Read an entity attached to a friend.
| |
RejectFriendInvitation |
Reject and delete a friend invitation.
| |
RemoveFriend |
Removes a user from the player's friend list.
| |
SendFriendInvitation |
Send an invitation to be friends.
|
using (var ruyi = RuyiSDK.CreateInstance(new RuyiSDKContext { endpoint = RuyiSDKContext.Endpoint.Console })) { void printFriends(RuyiNetFriendSummaryData[] friends) { if (friends == null) { Console.WriteLine("ListFriends() failed"); return; } foreach (var friend in friends) { Console.WriteLine(friend.Name); } } ruyi.RuyiNetService.Initialise(APP_ID, APP_SECRET, () => { // Get friends BEFORE adding a friend ruyi.RuyiNetService.FriendService.ListFriends(0, (RuyiNetFriendSummaryData[] friendsBefore) => { Console.WriteLine("Friends BEFORE:"); printFriends(friendsBefore); // Add a friend ruyi.RuyiNetService.FriendService.AddFriend(0, FRIEND_PROFILE_ID, (RuyiNetResponse response) => { // Get friends AFTER adding a friend ruyi.RuyiNetService.FriendService.ListFriends(0, (RuyiNetFriendSummaryData[] friendsAfter) => { Console.WriteLine("Friends After:"); printFriends(friendsAfter); } ); }); }); }); while (ruyi.RuyiNetService.IsWorking) { ruyi.Update(); } }