PresenceGetPresence Method Open Real Time Connectivity Application Programming Interface Help
Gets the subscriptions in the specified channel and if active the first 100 unique metadata.

Namespace: Ibt.Ortc.Api.Extensibility
Assembly: Ibt.Ortc.Api.Extensibility (in Ibt.Ortc.Api.Extensibility.dll) Version: 2.1.14.0 (2.1.14)
Syntax

public static void GetPresence(
	string url,
	bool isCluster,
	string applicationKey,
	string authenticationToken,
	string channel,
	OnPresenceDelegate callback
)

Parameters

url
Type: SystemString
Server containing the presence service.
isCluster
Type: SystemBoolean
Specifies if url is cluster.
applicationKey
Type: SystemString
Application key with access to presence service.
authenticationToken
Type: SystemString
Authentication token with access to presence service.
channel
Type: SystemString
Channel with presence data active.
callback
Type: Ibt.Ortc.Api.ExtensibilityOnPresenceDelegate
OnPresenceDelegateCallback with error OrtcPresenceException and result Presence.
Examples

client.Presence("http://ortc-developers.realtime.co/server/2.1", true, "myApplicationKey", "myAuthenticationToken", "presence-channel", (error, result) =>
{
    if (error != null)
    {
        Console.WriteLine(error.Message);
    }
    else
    {
        if (result != null)
        {
            Console.WriteLine(result.Subscriptions);

            if (result.Metadata != null)
            {
                foreach (var metadata in result.Metadata)
                {
                    Console.WriteLine(metadata.Key + " - " + metadata.Value);
                }
            }
        }
        else
        {
            Console.WriteLine("There is no presence data");
        }
    }
});
See Also

Reference