Sha256: 37ccfd49d72130f76779cec5232055b6814cbfae2d7e6bd1e198ec24a03bf3b4

Contents?: true

Size: 388 Bytes

Versions: 2

Compression:

Stored size: 388 Bytes

Contents

module Smartdc
  module Api
    class Datacenters
      attr_reader :request, :id

      def initialize(request, id=nil)
        @request = request
        @id = id
      end

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

      def find(params={})
        request.get('my/datacenters', params)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
smartdc-0.4.0 lib/smartdc/api/datacenters.rb
smartdc-0.3.0 lib/smartdc/api/datacenters.rb