8/5/2023 0 Comments Emby client apps![]() ServerInfo and ApiClient will be null if State = Unavailable. ![]() It will return a result object with three properties: CreateWebSocket) Multi-Server Startup WorkflowĪfter you've created your instance of IConnectionManager, simply call the Connect method. Var connectionManager = new ConnectionManager( logger,ĬlientWebSocketFactory. var serverLocator = new ServerLocator( logger) If using the portable class library you'll need to supply your own IServerLocator implementation. var networkConnection = new NetworkConnection( logger) If using the portable class library you'll need to supply your own INetworkConnection implementation. Developers will have to implement ICredentialProvider to provide storage for saving server information var credentialProvider = new CredentialProvider() Once you have an ApiClient instance, you can easily connect to the server's web socket using: Search recursively through the user's library Recursive = true Get the ten most recently added items for the current user var items = await client. RemoteLoggedOut += ApiClient_RemoteLoggedOut RemoteLoggedOut indicates the user was logged out remotely by the server ApiClient. Report capabilities after authentication await ApiClient. Var authResult = await AuthenticateUserAsync( "username ", passwordHash) Var client = new ApiClient( logger, " ", "My client name ", device, cryptoProvider) var cryptoProvider = new CryptographyProvider() If using the portable class library you'll need to supply your own ICryptographyProvider implementation. If using the portable class library you'll need to supply your own IDevice implementation. This describes the device capabilities var capabilities = new ClientCapabilities() Developers are encouraged to create their own ILogger implementation var logger = new NullLogger()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |