Hub JS Package

Hub JS Package

  • Users
  • Buckets
  • Threads
  • Textile Docs

›Buckets

Buckets

  • Buckets.copyAuth() method
  • Buckets.withUserAuth() method
  • Buckets.withKeyInfo() method
  • Buckets.getToken() method
  • Buckets.getTokenChallenge() method
  • Buckets.setToken() method
  • Buckets.withThread() method
  • Buckets.getOrCreate() method
  • Buckets.create() method
  • Buckets.existing() method
  • Buckets.root() method
  • Buckets.links() method
  • Buckets.list() method
  • Buckets.listPath() method
  • Buckets.listPathFlat() method
  • Buckets.listIpfsPath() method
  • Buckets.movePath() method
  • Buckets.open() method
  • Buckets.pushPath() method
  • Buckets.pushPaths() method
  • Buckets.pushPathAccessRoles() method
  • Buckets.pullPath() method
  • Buckets.pullPathAccessRoles() method
  • Buckets.pullIpfsPath() method
  • Buckets.remove() method
  • Buckets.removePath() method
  • Buckets.setPath() method

Experimental

  • Archive interface
  • ArchiveDealInfo interface
  • ArchiveStatus enum

Types

  • GetOrCreateOptions interface
  • GetOrCreateResponse interface
  • CreateOptions interface
  • CreateResponse interface
  • Links interface
  • Path interface
  • PathAccessRole enum
  • PathItem interface
  • Root interface
  • BuckMetadata interface

@textile/hub > Buckets > links

Buckets.links() method

Returns a list of bucket links.

Signature:

links(key: string, path?: string): Promise<Links>;

Parameters

ParameterTypeDescription
keystringUnique (IPNS compatible) identifier key for a bucket.
pathstringpath within the bucket for links (default '/').

Returns:

Promise<Links>

Example

Generate the HTTP, IPNS, and IPFS links for a Bucket

import { Buckets } from '@textile/hub'

const getIpnsLink = async (buckets: Buckets, bucketKey: string) => {
   const links = await buckets.links(bucketKey)
   return links.ipns
}

const getWwwLink = async (buckets: Buckets, bucketKey: string) => {
   const links = await buckets.links(bucketKey)
   return links.www
}

← Buckets.root() methodBuckets.list() method →
  • Buckets.links() method
  • Parameters
  • Example
Hub JS Package
Docs
Getting StartedThreadDBBuckets
Resources
All DocumentationProject SlackBlog
More
GitHubStar
Follow @textileio