Skip to content

Commit

Permalink
Merge pull request #349 from nielsvanvelzen/deprecate-ws1
Browse files Browse the repository at this point in the history
Deprecate WebSocketApi
  • Loading branch information
Maxr1998 authored Jan 1, 2022
2 parents d7ac4f0 + 650ab1f commit c7100b2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jellyfin-api/api/jellyfin-api.api
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public final class org/jellyfin/sdk/api/client/extensions/ApiClientExtensionsKt
public static final fun getYearsApi (Lorg/jellyfin/sdk/api/client/ApiClient;)Lorg/jellyfin/sdk/api/operations/YearsApi;
}

public final class org/jellyfin/sdk/api/client/extensions/CommonApiClientExtensionsKt {
public final class org/jellyfin/sdk/api/client/extensions/JvmApiClientExtensionsKt {
public static final fun getWebSocket (Lorg/jellyfin/sdk/api/client/ApiClient;)Lorg/jellyfin/sdk/api/sockets/WebSocketApi;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
@file:JvmName("CommonApiClientExtensionsKt")
@file:JvmName("JvmApiClientExtensionsKt")

package org.jellyfin.sdk.api.client.extensions

import org.jellyfin.sdk.api.client.ApiClient
import org.jellyfin.sdk.api.sockets.WebSocketApi

@Suppress("DeprecatedCallableAddReplaceWith")
@Deprecated("Replaced with the new SocketApi. This class will be removed in the next SDK release.")
public val ApiClient.webSocket: WebSocketApi
get() = getOrCreateApi { WebSocketApi(it) }
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.jellyfin.sdk.model.socket.IncomingSocketMessage
/**
* Subscription to the [WebSocketApi] that can be cancelled.
*/
@Deprecated("Replaced with the new SocketApi. This class will be removed in the next SDK release.")
public class SocketSubscription(
private val webSocketApi: WebSocketApi,
internal val callback: suspend (IncomingSocketMessage) -> Unit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ private val logger = KotlinLogging.logger {}
*
* The user should verify the access token is correct as the server does not respond to bad authorization.
*/
@Deprecated("Replaced with the new SocketApi. This class will be removed in the next SDK release.")
public class WebSocketApi(
private val api: ApiClient,
) : Api {
Expand Down

0 comments on commit c7100b2

Please sign in to comment.