Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

SoftLayer Object Storage Ruby Client

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CONTRIBUTORS
Octocat-spinner-32 COPYING
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.markdown
Octocat-spinner-32 softlayer-object-storage.gemspec
README.markdown

SoftLayer Object Storage Ruby Client

Ruby bindings for SoftLayer Object Storage

Basic Usage

sl_storage = SoftLayer::ObjectStorage::Connection.new({
    :username => "YOUR_USERNAME", 
    :api_key => "YOUR_API_KEY", 
    :datacenter => :dal05
})

sl_storage.containers
# ["foo"]

sl_storage.create_container("bar")

sl_storage.containers
# ["foo", "bar"]

container = sl_storage.container("foo")
container.objects
# []

container.create_object("baz")

container.objects
# ["foo"]

object = container.object("foo")

Search Usage

results = sl_storage.search(:q => "bar")

puts results[:count]
# 1

puts results[:items][0].inspect
# {:type => "container", :name => "bar"...}

For complete usage examples, see the specs.

Something went wrong with that request. Please try again.