port everything from easybib/api-client-php