Skip to content
Snippets Groups Projects
Select Git revision
  • main
1 result

laravel-pubmed-api

  • Clone with SSH
  • Clone with HTTPS
  • Installation

    You can install the package via composer:

    composer require dterumal/laravel-pubmed-api

    You can publish the config file with:

    php artisan vendor:publish --provider="Dterumal\LaravelPubmedApi\LaravelPubmedApiServiceProvider" --tag="laravel-pubmed-api-config"

    This is the contents of the published config file:

    return [
    
        /*
        |--------------------------------------------------------------------------
        | PubMed Settings
        |--------------------------------------------------------------------------
        |
        | Make sure to use a proper URI to access PubMed API service.
        |
        */
        'uri' => env('PUBMED_URI', 'https://eutils.ncbi.nlm.nih.gov'),
    
        'path' => env('PUBMED_PATH', '/entrez/eutils/esummary.fcgi'),
    
        'response_type' => env('PUBMED_RESPONSE_TYPE', 'json'),
    
        'database' => env('PUBMED_DB', 'pubmed'),
    
        'timeout' => 2.0,
    
        /*
        |--------------------------------------------------------------------------
        | Cache Settings
        |--------------------------------------------------------------------------
        |
        | Define the max age (or TTL) to cache responses. This will speed up your
        | requests.
        |
        */
        'cache_ttl' => env('PUBMED_CACHE_TTL', true),
    ];

    Usage

    use Dterumal\LaravelPubmedApi\LaravelPubmedApi;
    
    app(LaravelPubmedApi::class)->find('12345');

    Testing

    composer test

    Changelog

    Please see CHANGELOG for more information on what has changed recently.

    Contributing

    Please see CONTRIBUTING for details.

    Security Vulnerabilities

    Please review our security policy on how to report security vulnerabilities.

    Credits

    License

    The MIT License (MIT). Please see License File for more information.