Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Smithsonian Open Access API Integration

The Smithsonian Open Access module provides a simple and convenient way to interact with the Smithsonian Open Access API in your Drupal site. It allows you to search the API, customize the search results using various parameters, and display the JSON data on the screen.

Features

  • Easy configuration of API settings through the Drupal admin interface
  • Test API key functionality to verify the validity of the API key
  • A search form to test search queries using the Smithsonian Open Access API
  • An API wrapper class (Api.php) that can be used by other developers to interact with the API

Installation

  1. Download the smithsonian_open_access module and place it in the /modules/custom directory of your Drupal site. If you cloned the repository, make sure the name of the module directory is smithsonian_open_access.
  2. Enable the module using the Drupal admin interface or by running drush en smithsonian_open_access in the command line.

Configuration

  1. Navigate to the module configuration page at /admin/config/smithsonian-open-access.
  2. Enter your Smithsonian Open Access API key and customize other settings if necessary. To obtain an API key for the Smithsonian Open Access API, visit data.gov.
  3. Click the "Test API Key" button to verify the validity of your API key.
  4. Save the configuration.

Usage

To use the search form provided by the module, navigate to /admin/config/content/smithsonian-open-access/search-test. Enter a search phrase and click the "Search" button to display the JSON data returned by the API.

To use the API wrapper class in your custom code, you can follow these steps:

  1. Import the Api class: use Drupal\smithsonian_open_access\Api;
  2. Inject the Api class as a dependency in your custom class or service.
  3. Call the search() method of the Api class to perform a search query.

Refer to the module's source code for more examples and details on using the API wrapper class.

API Documentation

The smithsonian_open_access.api.yml file in the module's root directory provides an OpenAPI specification for the module's API. You can use this file to generate API documentation or provide it to other developers for easier integration.

License and Content

This module is licensed under the GNU General Public License v2.0 or later.

The content provided by the Smithsonian Open Access API is available under the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. You are free to use, modify, and distribute the content for any purpose, including commercial use, without requiring attribution to the Smithsonian Institution.

Please note that while the API provides CC0 content, other aspects of the module, such as code and documentation, may be subject to different licensing terms.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
May 2023
Latest release
3 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.x-dev Dev May 4, 2023