Crate iars

source ·
Expand description

This is a synchronous (blocking) client written purely in Rust, for interfacing with Internet Archive APIs.

API List

SupportedNameEndpoint
PartialIAS3 (S3-like) (API docs)https://s3.us.archive.org/{identifier}
NoItem Metadata (API docs)https://archive.org/metadata/{identifier}
NoItem Views (API docs)https://be-api.us.archive.org/views/v1/short/{identifier}[,...]
NoItem Reviews (API docs)https://archive.org/services/reviews.php
NoItem Changes (API docs)https://be-api.us.archive.org/changes/v1
NoItem Tasks (API docs)https://archive.org/services/tasks.php

The IAS3, Metadata, Views, and Reviews APIs are accessible through the Item data type. The remaining APIs are accessed via their respective module (changes, and tasks).

S3-like API

Also refered to the ias3, this API is responsible for providing read and write access to the files that make up an item on the Internet Archive. It is refered to as S3-like because each item is mapped to an “S3 bucket”. You do not need to know what S3 is, or how it works, in order to use this API.

Critically, using an existing S3 crate, such as rust-s3, doesn’t seem compatible with this API (authentication doesn’t work). The API differs in several ways, and includes numerous custom HTTP headers which affect the behavior of each request.

Why not async?

Using async often severely increases the number of dependencies required to use a crate, and increases the complexity of its development and usage.

For scenarios involving many IO or networking requests, such as web servers, async is definitely useful in maximizing performance and throughput. Making use of the Internet Archive’s APIs however, should not require many simutaneous connections. Plus, throughput for expensive requests, such as uploading/downloading large files, will be cumulatively limited by either the user’s internet service or Internet Archive. So performing multiple uploads/downloads at the same time will likely not yield any significant benefit.

Modules

Structs

  • Container for the access and secret keys required for some actions in the Internet Archive API.
  • Represents a particular item on the Internet Archive.

Enums

Constants

Functions