fetchKml should work just fine for loading kmz files too. (ie the fetchKml from the Earth API does)
WMS would be more complicated (but still doable) - given a WMS input url, would have to build a network link. Can see how the WMS dialog works in Google Earth - try it out, and see the NetworkLink that is created. Would have to emulate that.
If the WMS url defines the exact map/layer to plot its relativly easy. But if the API is expected to query getCapablities, that is significantly harder. Probably not worth doing - as it would probably having to build a user-interface, so the user could choose which layer to show, and woudl probably require a proxy to contact the WMS server.