Convert ReadMetadata() to use MediaWiki::API