Fix for #4 - extract document ids in get_publications

Address #4. Please run our own tests before merging.

Great package!