Skip to content

Instantly share code, notes, and snippets.

Enterprise API Lookup Domains

DF Studio supports Custom Lookup Domains - Enterprise-controlled terms a user picks from when editing a metadata field. The terms available for a field are based the path in DF Studio (path), and/or the value of another metadata field (meta). Terms or Options are associated with Folders and Projects in DF Studio (path) and/or with specific values of fields on the Asset. Path based terms can be edited from within DF Studio (or can be hidden); All terms can be edited from the Enterprise API. The Enterprise API (found at https://yourdomain.dfstudio.com/api/v1/session.js) has several new resources which can be used to manage Lookup Domain values.

Lookup Domain Terms can also optionaly have Labels associated with them. When a label is present it will be shown in the DF Studio interface and used for Search Indexing. The value will be shown in the Enterprise API. Labels are optional and only supported for Dropdowns, Radio, Checkboxes, and Selectors.

This d

@msgile
msgile / demo_coroutines.kt
Created June 16, 2017 18:25
Kotlin example of using coroutines
fun computer(): Int = runBlock {
val partA = async(CommonPool) { computeA() }
val partB = async(CommonPool) { computeB() }
partA.await() + partB.await() //last command emits results
}
val total = computer() // = 15
@msgile
msgile / demo_no_coroutines.kt
Last active June 17, 2017 19:05
Kotlin code showing simple computer before coroutines
package test.coroutines
fun computeA(): Int {
Thread.sleep(2_000) //simulate work
return 10
}
fun computeB(): Int {
Thread.sleep(2_000) //simulate work
return 5