Skip to content
This repository was archived by the owner on Jul 26, 2020. It is now read-only.

Document the implemented methods #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,44 @@ Or install it yourself as:
gem install minio-ruby
```

## Usage

### Initialize the client

```
require 'minio'

MinioRuby::Client.configure do |cfg|
cfg.endpoint = "<minio-server-endpoint>"
cfg.access_key = "<my-access-key>"
cfg.secret_key = "<my-secret-key>"
end
client = MinioRuby::Client.new
```

### Interact with the MinIO server

```
# List the buckets
client.list_buckets

# Create new bucket
client.make_bucket "my-bucket-1"

# Check if bucket exists
client.bucket_exists? "my-bucket-1"

# Put object
client.put_object("my-bucket-1", "my-file.txt", File.read("my-object.txt"))

# Get object
client.get_object "my-bucket-1", "my-file.txt"

# remove bucket
client.remove_bucket "my-bucket-1"

```

## Development

To build the minio gem yourself
Expand Down