@textile/hub > Buckets > archives
Buckets.archives() method
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
archives returns the curent and historical archives for a Bucket.
Signature:
archives(key: string): Promise<Archives>;
Parameters
Parameter | Type | Description |
---|---|---|
key | string | Unique (IPNS compatible) identifier key for a bucket. |
Returns:
Promise<Archives>
Example
Get current and historical archives
import { Buckets } from '@textile/hub'
async function status (buckets: Buckets, key: string) {
const { current, history } = await buckets.archives(key)
}