diff --git a/README.md b/README.md index 76a03f3..83f2643 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Amazon S3 for Deno ```ts import { S3, S3Bucket } from "https://deno.land/x/s3@0.4.1/mod.ts"; -// Create a new bucket. +// Create a S3 instance. const s3 = new S3({ accessKeyID: Deno.env.get("AWS_ACCESS_KEY_ID")!, secretKey: Deno.env.get("AWS_SECRET_ACCESS_KEY")!, @@ -21,10 +21,14 @@ const s3 = new S3({ endpointURL: Deno.env.get("S3_ENDPOINT_URL"), }); -const myBucket = await s3.createBucket("my-bucket", { acl: "private" }); +// Create a new bucket. +let bucket = await s3.createBucket("test", { acl: "private" }); + +// Get an existing bucket. +bucket = s3.getBucket("test"); -// Create a bucket instance from an existing bucket. -const bucket = new S3Bucket({ +// Create a bucket instance manuely. +bucket = new S3Bucket({ accessKeyID: Deno.env.get("AWS_ACCESS_KEY_ID")!, secretKey: Deno.env.get("AWS_SECRET_ACCESS_KEY")!, bucket: "test",