Skip to content
Snippets Groups Projects
William Walker's avatar
William Walker authored
--Configure build constants via gradle plugin (https://github.com/gmazzo/gradle-buildconfig-plugin)
--Expose build info via defined library companion object fields
--Add build variant Enum class to be used for debugging purposes
--Add reminders to eventually allow for user-defined timezone localization
949b0e39
History

Temerity

Kotlin Multiplatform Library for interacting with the YuJa Enterprise Video Platform

Maven Local Pipeline Issues Kotlin Gradle License

How to add and use this library

The library is available from the public Maven repository for this Gitlab project.

Dependency setup instructions

Add the Maven repository, either in your build.gradle.kts file or in a dependencyResolutionManagement{} block in your settings.gradle.kts file.

repositories {
  maven("https://git.ucsc.edu/api/v4/projects/12162/packages/maven")
}

To use the library in a regular JVM project, add a dependency.

dependencies {
  implementation("edu.ucsc.its:temerity-jvm:0.1.0")
}

In Kotlin Multiplatform projects, add the dependency to the commonMain source-set.

commonMain {
    dependencies { 
      implementation("edu.ucsc.its:temerity:0.1.0")
    }
}

Usage

Build a Temerity client, then start making requests:

    val client = Temerity {
                serviceUrl("https://your_organization.yuja.com/services/")
                serviceToken("your_API_token") }
    runBlocking { client.getUsers().forEach { println(it) } }

    val returnedDevices = runBlocking { client.getDevices() }
    println("Returned devices:")
    returnedDevices.forEach { println(it) }

    stopTemerity()

Result:

User(loginId=...., emailAddress=...., userType=Student, userId=12345678, timezone=America/Los_Angeles, customId=, lastName=...,
User(...)
User(...)

// Returned devices:
Device(stationName=DELL-DATAPATH-9020, accessLevel=Administrators, deviceId=...
Device(stationName=DELL-DATAPATH-7040, accessLevel=Administrators, deviceId=...
Device(...
Device(...