Download the PHP package survos/nara-php-api without Composer

On this page you can find all versions of the php package survos/nara-php-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nara-php-api

NARA Catalog PHP API

A PHP client for the National Archives Catalog API v2.

Installation

This library requires Symfony HTTP Client (included as a dependency).

Quick Start

Contributing data (write)

The Catalog API can also write contributions — transcriptions, tags, and comments — back to the National Archives. This is how you give OCR or human-keyed text a permanent home in the national record.

These map to POST /api/v2/{transcriptions,tags,comments} with a JSON body of { <text field>, targetNaId, userId } — transcriptions also require targetObjectId (the specific digital object the text belongs to).

Finding the targetObjectId

A record (naId) can hold many digital objects (pages/images), each with its own objectId. To transcribe page by page, list the objects first and submit one transcription per object:

To discover your Catalog user UUID (or check an object's current transcription before overwriting), search existing contributions:

Enabling write access

Write access is not enabled on a standard read key. Email [email protected] with your email and Catalog username to have contributions enabled for your key. You also need your Catalog user UUID — find it in the userId field of any of your existing contributions (e.g. GET /api/v2/contributions/search).

CLI: bin/contribute.php

A safe demo command — dry-run by default, it only writes when you pass --force:

API Key

To get an API key, email [email protected].

Demo

A CLI demo is included:

Bulk Data

For large-scale data access, NARA provides bulk downloads on AWS S3:

See NARA Developer Docs for more.

License

MIT License - see LICENSE file.


All versions of nara-php-api with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
symfony/http-client Version ^8.0
symfony/console Version ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package survos/nara-php-api contains the following files

Loading the files please wait ...