Sha256: b689876154dc98b5ceadfcd03030a6b36419ae0d7db869c6a954cd490537187f

Contents?: true

Size: 548 Bytes

Versions: 1

Compression:

Stored size: 548 Bytes

Contents

module Smartdc
  module Api
    class Keys
      attr_reader :request

      def initialize(options)
        @request = Smartdc::Request.new(options)
      end

      def create(raw={})
        request.post('my/keys/', raw)
      end

      def read(id)
        raise ArgumentError unless id
        request.get('my/keys/' + id.to_s)
      end

      def all(query={})
        request.get('my/keys', query)
      end

      def destroy(id)
        raise ArgumentError unless id
        request.del('my/keys/' + id.to_s)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
smartdc-1.3.0 lib/smartdc/api/keys.rb