add typehint to AbstractApi::extractMeta() and little refactoring