Sha256: 577ee1c05ca64e207bc44e4ba1e94adab23246f0d2ac8779176c4d75001c4f28

Contents?: true

Size: 782 Bytes

Versions: 8

Compression:

Stored size: 782 Bytes

Contents

class Shelly::Client
  def create_app(attributes)
    organization = attributes.delete(:organization_name)
    region = attributes.delete(:region)
    zone = attributes.delete(:zone)
    post("/apps", :app => attributes, :organization_name => organization,
           :region => region, :zone => zone)
  end

  def delete_app(code_name)
    delete("/apps/#{code_name}")
  end

  def start_cloud(cloud)
    put("/apps/#{cloud}/start")
  end

  def stop_cloud(cloud)
    put("/apps/#{cloud}/stop")
  end

  def apps
    get("/apps")
  end

  def app(code_name)
    get("/apps/#{code_name}")
  end

  def statistics(code_name)
    get("/apps/#{code_name}/statistics")
  end

  def command(cloud, body, type)
    post("/apps/#{cloud}/command", {:body => body, :type => type})
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
shelly-0.5.7 lib/shelly/client/apps.rb
shelly-0.5.6 lib/shelly/client/apps.rb
shelly-0.5.5 lib/shelly/client/apps.rb
shelly-0.5.4 lib/shelly/client/apps.rb
shelly-0.5.3 lib/shelly/client/apps.rb
shelly-0.5.2 lib/shelly/client/apps.rb
shelly-0.5.1 lib/shelly/client/apps.rb
shelly-0.5.0 lib/shelly/client/apps.rb