Wrap riot API in scala code