The https://github.com/addwiki/wikibase-api/blob/master/README.md misses some vital information when building the code.
To make the https://github.com/addwiki/wikibase-api/blob/master/README.md#load--general-setup work on needs to add (and search for) dependencies
composer.json
"data-values/geo": "1.1.*", "data-values/time": "0.8.*", "data-values/number": "0.8.*"
It would be best to add this to the readme. See https://github.com/addwiki/wikibase-api/pull/44
To make the code run https://github.com/addwiki/wikibase-api/blob/master/README.md#create-an-empty-entity full path are needed.
$edit = new \Mediawiki\DataModel\Revision( new \Wikibase\DataModel\ItemContent( Wikibase\DataModel\Entity\Item::newEmpty() ) );
Not sure how to easy solve this apart from put this in the README but some factory methods would make this easier.