Sha256: 4edfd14bf9d30b8d991a9360368dedf007b63670dd1e54fe85380e85b98623e0

Contents?: true

Size: 654 Bytes

Versions: 12

Compression:

Stored size: 654 Bytes

Contents

class Shelly::Client
  def endpoints(cloud)
    get("/apps/#{cloud}/endpoints")
  end

  def endpoint(cloud, uuid)
    get("/apps/#{cloud}/endpoints/#{uuid}")
  end

  def create_endpoint(cloud, certificate, key, sni)
    endpoint = certificate && key ? {:certificate => certificate,
      :key => key} : {}

    post("/apps/#{cloud}/endpoints", :endpoint => endpoint.merge(:sni => sni))
  end

  def update_endpoint(cloud, uuid, certificate, key)
    put("/apps/#{cloud}/endpoints/#{uuid}",
      :endpoint => {:certificate => certificate, :key => key})
  end

  def delete_endpoint(cloud, uuid)
    delete("/apps/#{cloud}/endpoints/#{uuid}")
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
shelly-0.5.7 lib/shelly/client/endpoint.rb
shelly-0.5.6 lib/shelly/client/endpoint.rb
shelly-0.5.5 lib/shelly/client/endpoint.rb
shelly-0.5.4 lib/shelly/client/endpoint.rb
shelly-0.5.3 lib/shelly/client/endpoint.rb
shelly-0.5.2 lib/shelly/client/endpoint.rb
shelly-0.5.1 lib/shelly/client/endpoint.rb
shelly-0.5.0 lib/shelly/client/endpoint.rb
shelly-0.4.42 lib/shelly/client/endpoint.rb
shelly-0.4.41 lib/shelly/client/endpoint.rb
shelly-0.4.40 lib/shelly/client/endpoint.rb
shelly-0.4.39 lib/shelly/client/endpoint.rb