From c8c1cc26a0a068ed1c512133902a8c3f2274f46b Mon Sep 17 00:00:00 2001 From: dam-bal Date: Tue, 16 Apr 2024 21:50:53 +0100 Subject: [PATCH] updated README.md --- README.md | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 232bbbe..4afa6b8 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,47 @@ PHP Client for Vercel Blob Storage. -[Vercel Blob](https://vercel.com/docs/storage/vercel-blob) \ No newline at end of file +[Vercel Blob](https://vercel.com/docs/storage/vercel-blob) + +## Usage + +### Creating Client + +```php +$client = new \VercelBlobPhp\Client(); +``` + +### Using Client + +#### PUT +```php +$result = $client->put( + 'test.txt', // path + 'hello world' // content, + new \VercelBlobPhp\CommonCreateBlobOptions( + addRandomSuffix: true, // optional + contentType: 'text', // optional + cacheControlMaxAge: 123, // optional + ) +); + +// $result is instance of PutBlobResult +$result->url +$result->downloadUrl +$result->pathname +$result->contentType +$result->contentDisposition +``` + +Third argument is optional. + +#### DEL +```php +$client->del(['test.txt']); +``` + +#### COPY + +#### HEAD + +#### LIST \ No newline at end of file