The project is in a healthy, maintained state
BunnyStorage Client is a Ruby SDK for interacting with BunnyCDN storage services.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.1.0
 Project Readme

BunnyStorage Client

BunnyStorage Client is a Ruby SDK for interacting with BunnyCDN storage services.

API Documentation: https://docs.bunny.net/reference/storage-api

Gem Version

Installation

Add this line to your application's Gemfile:

gem 'bunny_storage_client'

And then execute:

bundle install

Or install it yourself as:

gem install bunny_storage_client

Usage

# Initialize the client
client = BunnyStorageClient.new('your_access_key', 'your_api_key', 'your_storage_zone')

# Set the object
client.object('your_filename')

# Upload a file
client.upload_file(body: File.open('path/to/local/file'))

# Retrieve a file as a string
file_content = client.get_file(as: :string)

# Retrieve a file as a tempfile
file_temp = client.get_file(as: :file)

# Delete a file
client.delete_file

# Purge cache
client.purge_cache

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/rkwap/bunny_storage_client.

License

The gem is available as open source under the terms of the MIT License.