Create classes inherited from APIBase dynamically

This allows supporting any new namespaces with zero effort going forward