bunbun
Ruby client for the bunny.net API.
Installation
Using Bundler:
$ bundle add bunbun
Using RubyGems:
$ gem install bunbun
Usage
For accessing the bunny.net API:
require 'bunbun'
client = BunBun::Client.new(access_key: access_key)
client.storage_zone.list.each do |zone|
puts zone.values_at('Id', 'Name', 'FilesStored').join(' )
endFor accessing files on edge storage:
require 'bunbun'
file = 'image.jpg'
zone = 'zone-name'
host = 'storage.bunnycdn.com'
client = BunBun::Client.new(access_key: access_key, host: host)
client.download("/#{zone}/#{file}", file)You can store your access key in a BUNNY_ACCESS_KEY environment variable,
and the storage host in a BUNNY_HOST environment variable.