@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
Parameter | Type | Description |
---|---|---|
name | string | name of bucket |
threadName | string | the name of the thread where the bucket is stored (default buckets ) |
encrypted | boolean | encrypt the bucket contents (default false ) |
threadID | string | id of thread where bucket is stored |
Returns:
Promise<{ root?: Root; threadID?: string; }>