Skip to content

Commit

Permalink
Add standalone documentation to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeDupuis committed Jun 7, 2024
1 parent f970f0e commit 3b4ebf5
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3b4ebf5

Please sign in to comment.