Hub JS Package

Hub JS Package

  • Users
  • Buckets
  • Threads
  • Textile Docs

@textile/hub > Buckets > getOrInit

Buckets.getOrInit() method

Warning: This API is now obsolete.

getOrInit has been replaced with getOrCreate

(Deprecated) Open a new / existing bucket by bucket name and ThreadID (create not required)

Signature:

getOrInit(name: string, threadName?: string, encrypted?: boolean, threadID?: string): Promise<{
        root?: Root;
        threadID?: string;
    }>;

Parameters

ParameterTypeDescription
namestringname of bucket
threadNamestringthe name of the thread where the bucket is stored (default buckets)
encryptedbooleanencrypt the bucket contents (default false)
threadIDstringid of thread where bucket is stored

Returns:

Promise<{ root?: Root; threadID?: string; }>

  • Buckets.getOrInit() method
  • Parameters
Hub JS Package
Docs
Getting StartedThreadDBBuckets
Resources
All DocumentationProject SlackBlog
More
GitHubStar
Follow @textileio