
Client library for interfacing with the SponsorBlock API, enabling retrieval and voting on video segments using Ktor. Offers both guest and authenticated user functionalities.
A Kotlin Multiplatform client library for the SponsorBlock API, powered by Ktor.
Add the following to your gradle/libs.versions.toml:
[versions]
sbkt = "x.y.z" # Replace with latest version
[libraries]
sbkt-client = { module = "dev.zt64.sbkt:client", version.ref = "sbkt" }
# or
sbkt-core = { module = "dev.zt64.sbkt:core", version.ref = "sbkt" }Then add the dependency to your module's build.gradle.kts:
dependencies {
implementation(libs.sbkt.client) // Full implementation with Ktor
// or
implementation(libs.sbkt.core) // Core functionality only
}[!NOTE] A Ktor engine implementation must be included in your dependencies to use the client.
// Create an unauthenticated guest client
val client = SponsorBlockClient()
// Get segments for a video
val segments = client.getSegments(VIDEO_ID)
// Create a client with a user ID
val userClient = SponsorBlockClient.user(USER_LOCAL_ID)
// Vote on segments
userClient.upvoteSegment(segmentUuid, videoId)This project is licensed under the MIT License.
A Kotlin Multiplatform client library for the SponsorBlock API, powered by Ktor.
Add the following to your gradle/libs.versions.toml:
[versions]
sbkt = "x.y.z" # Replace with latest version
[libraries]
sbkt-client = { module = "dev.zt64.sbkt:client", version.ref = "sbkt" }
# or
sbkt-core = { module = "dev.zt64.sbkt:core", version.ref = "sbkt" }Then add the dependency to your module's build.gradle.kts:
dependencies {
implementation(libs.sbkt.client) // Full implementation with Ktor
// or
implementation(libs.sbkt.core) // Core functionality only
}[!NOTE] A Ktor engine implementation must be included in your dependencies to use the client.
// Create an unauthenticated guest client
val client = SponsorBlockClient()
// Get segments for a video
val segments = client.getSegments(VIDEO_ID)
// Create a client with a user ID
val userClient = SponsorBlockClient.user(USER_LOCAL_ID)
// Vote on segments
userClient.upvoteSegment(segmentUuid, videoId)This project is licensed under the MIT License.