Calling Custom SM ScriptLibrary from HP OO

Hi,

What are the options to call own custom scriptLibrary in SM from OO? Can it be done other than REST API?
Appreciate if could prodive sample

Please advice, thanks