From 3b4ebf5ead348838b6c16b69d00d4556298847cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A9=20Dupuis?= Date: Thu, 6 Jun 2024 17:13:04 -0700 Subject: [PATCH] Add standalone documentation to readme --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 67679fc..cf6fca1 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,31 @@ To migrate from azure-storage-blob to azure-blob: 4. Restart or deploy the app. +## Standalone + +Instantiate a client with your account name, an access key and the container name: + +```ruby +client = AzureBlob::Client.new( + account_name: @account_name, + access_key: @access_key, + container: @container, + ) + +path = "some/new/file" + +# Upload +client.create_block_blob(path, "Hello world!") + +# Download +client.get_blob(path) #=> "Hello world!" + +# Delete +client.delete_blob(path) +``` + +For the full list of methods: https://www.rubydoc.info/gems/azure-blob/AzureBlob/Client + ## Contributing ### Dev environment