Package io.supabase.api
Class StorageBucketAPI
java.lang.Object
io.supabase.api.StorageBucketAPI
- All Implemented Interfaces:
IStorageBucketAPI
- Direct Known Subclasses:
StorageClient
-
Constructor Summary
Constructors -
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:
createBucketin interfaceIStorageBucketAPI- Parameters:
bucketId- The name/id of the bucket you want to create.- Returns:
- a
CreateBucketResponseobject.
-
createBucket
public CompletableFuture<CreateBucketResponse> createBucket(String bucketId, BucketCreateOptions options) POST /bucket/
- Specified by:
createBucketin 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
CreateBucketResponseobject.
-
listBuckets
GET /bucket/
Lists all buckets in the project.- Specified by:
listBucketsin interfaceIStorageBucketAPI- Returns:
- A list of all buckets.
-
emptyBucket
POST /bucket/{bucketId}/empty
- Specified by:
emptyBucketin interfaceIStorageBucketAPI- Parameters:
bucketId- The bucket you want to empty.- Returns:
- a status message
-
getBucket
GET /bucket/{bucketId}/
- Specified by:
getBucketin 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:
updateBucketin 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:
deleteBucketin interfaceIStorageBucketAPI- Parameters:
bucketId- The bucket of which you want to delete.- Returns:
- a status message
-