tmpjr / pubmed
Wrapper API for the NCBI PubMed EFetch Utilities developed at Ambry Genetics and made public for use by the community.
Installs: 2 819
Dependents: 0
Suggesters: 0
Security: 0
Stars: 12
Watchers: 3
Forks: 12
Open Issues: 2
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-04-26 18:27:01 UTC
README
API wrapper library to interface with NCBI's PubMed Efetch Server
Getting started
Installing via Composer
The recommended way to install PubMed is through Composer.
-
Add
tmpjr/pubmed
as a dependency in your project'scomposer.json
file:{ "require": { "tmpjr/pubmed": "dev-master" } }
-
Download and install Composer:
curl -s http://getcomposer.org/installer | php
-
Install your dependencies:
php composer.phar install
-
Require Composer's autoloader
Composer also prepares an autoload file that's capable of autoloading all of the classes in any of the libraries that it downloads. To use it, just add the following line to your code's bootstrap process:
require 'vendor/autoload.php';
You can find out more on how to install Composer, configure autoloading, and other best-practices for defining dependencies at getcomposer.org.
Basic Usage
<?php require 'vendor/autoload.php'; // Search By PMID $api = new PubMed\PubMedId(); $article = $api->query(15221447); print_r($article); // Search By Term $api = new PubMed\Term(); $api->setReturnMax(100); // set max returned articles, defaults to 10 $articles = $api->query('CFTR'); print_r($articles);
License
Licensed under the open MIT license: