Sha256: 382c517abaa1d432ff18c4808a15257b080bf4d93ec829913a516de17e12f296

Contents?: true

Size: 382 Bytes

Versions: 1

Compression:

Stored size: 382 Bytes

Contents

module Smartdc
  module Api
    class Datacenters
      attr_reader :request

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

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

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