Skip to content

Social API Reference

Complete API reference for the Social module.


IVXFriendsManager

Friends and social relationships manager.

Properties

Property Type Description
Instance IVXFriendsManager Singleton instance
Friends List<FriendInfo> Cached friends list
IsInitialized bool Initialization status

Methods

GetFriendsAsync

public async Task<List<FriendInfo>> GetFriendsAsync(int limit = 100)

Gets the user's friends list.


SendFriendRequestAsync

public async Task SendFriendRequestAsync(string userId)

Sends a friend request.


AcceptFriendRequestAsync

public async Task AcceptFriendRequestAsync(string userId)

Accepts an incoming friend request.


RejectFriendRequestAsync

public async Task RejectFriendRequestAsync(string userId)

Rejects an incoming friend request.


RemoveFriendAsync

public async Task RemoveFriendAsync(string userId)

Removes a friend.


BlockUserAsync

public async Task BlockUserAsync(string userId)

Blocks a user.


UnblockUserAsync

public async Task UnblockUserAsync(string userId)

Unblocks a user.


GetPendingRequestsAsync

public async Task<List<FriendRequest>> GetPendingRequestsAsync()

Gets incoming friend requests.


SearchUsersAsync

public async Task<List<UserSearchResult>> SearchUsersAsync(string query, int limit = 20)

Searches for users by username.


Events

Event Signature Description
OnFriendAdded Action<FriendInfo> Friend added
OnFriendRemoved Action<string> Friend removed
OnFriendRequestReceived Action<FriendRequest> Request received
OnFriendOnlineStatusChanged Action<string, bool> Online status changed

FriendInfo

Friend data class.

Property Type Description
UserId string User ID
DisplayName string Display name
AvatarUrl string Avatar URL
IsOnline bool Online status
State FriendState Relationship state

FriendState Enum

public enum FriendState
{
    None = 0,
    Friend = 1,
    RequestSent = 2,
    RequestReceived = 3,
    Blocked = 4
}

IVXShareManager

Sharing and referral functionality.

Methods

ShareText

public void ShareText(string text, string subject = null)

Opens system share dialog with text.


ShareScreenshot

public async Task ShareScreenshot(string message = null)

Captures and shares a screenshot.


GenerateReferralCode

public string GenerateReferralCode()

Generates a referral code for the current user.


ApplyReferralCode

public async Task<bool> ApplyReferralCode(string code)

Applies a referral code.


See Also