Package io.supabase.api
Class StorageBucketAPI
java.lang.Object
io.supabase.api.StorageBucketAPI
- All Implemented Interfaces:
IStorageBucketAPI
- Direct Known Subclasses:
StorageClient
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateBucket
(String bucketId) POST /bucket/createBucket
(String bucketId, BucketCreateOptions options) POST /bucket/deleteBucket
(String bucketId) DELETE /bucket/{bucketId}emptyBucket
(String bucketId) POST /bucket/{bucketId}/emptyGET /bucket/{bucketId}/GET /bucket/updateBucket
(String bucketId, BucketUpdateOptions options) PUT /bucket/{bucketId}/
-
Constructor Details
-
StorageBucketAPI
-
-
Method Details
-
createBucket
POST /bucket/
- Specified by:
createBucket
in interfaceIStorageBucketAPI
- Parameters:
bucketId
- The name/id of the bucket you want to create.- Returns:
- a
CreateBucketResponse
object.
-
createBucket
public CompletableFuture<CreateBucketResponse> createBucket(String bucketId, BucketCreateOptions options) POST /bucket/
- Specified by:
createBucket
in interfaceIStorageBucketAPI
- Parameters:
bucketId
- The name/id of the bucket you want to create.options
- The options you want to pass for the bucket creation.- Returns:
- a
CreateBucketResponse
object.
-
listBuckets
GET /bucket/
Lists all buckets in the project.- Specified by:
listBuckets
in interfaceIStorageBucketAPI
- Returns:
- A list of all buckets.
-
emptyBucket
POST /bucket/{bucketId}/empty
- Specified by:
emptyBucket
in interfaceIStorageBucketAPI
- Parameters:
bucketId
- The bucket you want to empty.- Returns:
- a status message
-
getBucket
GET /bucket/{bucketId}/
- Specified by:
getBucket
in interfaceIStorageBucketAPI
- Parameters:
bucketId
- The bucket of which you want to retrieve.- Returns:
- the asked for bucket
-
updateBucket
public CompletableFuture<MessageResponse> updateBucket(String bucketId, BucketUpdateOptions options) PUT /bucket/{bucketId}/
- Specified by:
updateBucket
in interfaceIStorageBucketAPI
- Parameters:
bucketId
- The bucket you want to updateoptions
- The options to update the bucket to.- Returns:
- a status message
-
deleteBucket
DELETE /bucket/{bucketId}
- Specified by:
deleteBucket
in interfaceIStorageBucketAPI
- Parameters:
bucketId
- The bucket of which you want to delete.- Returns:
- a status message
-