When hosted parts library is not included officially in obniz.js, you need to import it code and register to obniz.js. PartsRegistrate() function will do registration.
Below is a example of registering MYLED class to Obniz parts library.
After that, call wired() to use it.
// Javascript Example
Obniz.PartsRegistrate(MYLED);
var led = obniz.wired("MYLED", { anode:0, cathode:1 } );
led.onesec();