Unfortunately, this is currently hard to do:
I’ll see if I can find a better way to do this with the current API.