docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class FriendsMessagingApi

    Represents a collection of functions to interact with the API endpoints

    Inheritance
    object
    FriendsMessagingApi
    Implements
    IFriendsMessagingApi
    IApiAccessor
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Services.Apis.Friends
    Assembly: solution.dll
    Syntax
    public class FriendsMessagingApi : IFriendsMessagingApi, IApiAccessor

    Constructors

    FriendsMessagingApi(IApiClient)

    Initializes a new instance of the FriendsMessagingApi class using a Configuration object and client instance.

    Declaration
    public FriendsMessagingApi(IApiClient apiClient)
    Parameters
    Type Name Description
    IApiClient apiClient

    The client interface for synchronous API access.

    FriendsMessagingApi(IApiClient, IApiConfiguration)

    Initializes a new instance of the FriendsMessagingApi class using a Configuration object and client instance.

    Declaration
    public FriendsMessagingApi(IApiClient apiClient, IApiConfiguration apiConfiguration)
    Parameters
    Type Name Description
    IApiClient apiClient

    The client interface for synchronous API access.

    IApiConfiguration apiConfiguration

    The configuration object.

    Properties

    Client

    The client for accessing this underlying API asynchronously.

    Declaration
    public IApiClient Client { get; }
    Property Value
    Type Description
    IApiClient

    Configuration

    Gets the configuration object

    Declaration
    public IApiConfiguration Configuration { get; }
    Property Value
    Type Description
    IApiConfiguration

    An instance of the Configuration

    Methods

    GetBasePath()

    Gets the base path of the API client.

    Declaration
    public string GetBasePath()
    Returns
    Type Description
    string

    The base path

    Message(MessageRequest, CancellationToken)

    Send a message to a user. Allows a user to send a message with a custom payload to another user. The Relationships Service will only allow a user to send a message to a user that they have an active FRIEND relationship with. The content of the payload can be customized entirely by the client. It is up to the client to determine how to best handle the message payload. For example, if the message payload contains a lobby ID, the client could show an Accept Invite toast. If the message contains a trade request, the client could enter a trading interface.

    Declaration
    public ApiOperation Message(MessageRequest messageRequest = null, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    MessageRequest messageRequest

    (optional)

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    ApiOperation

    The operation

    Implements

    IFriendsMessagingApi
    IApiAccessor
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)