lib/cloudkick/node.rb in cloudkick-0.2.5 vs lib/cloudkick/node.rb in cloudkick-0.2.6
- old
+ new
@@ -31,11 +31,11 @@
@status = status
@tags = tags
end
def check(type=nil)
- resp, data = access_token.get("/api/node/#{@id}/check/mem")
+ resp, data = access_token.get("/1.0/query/node/#{@id}/check/mem")
Crack::JSON.parse(data)
end
end
@@ -52,12 +52,12 @@
@nodes.each { |node| yield node }
end
def get
if @query
- resp, data = access_token.get("/api/nodes?query=#{query}")
+ resp, data = access_token.get("/1.0/query/nodes?query=#{query}")
else
- resp, data = access_token.get("/api/nodes")
+ resp, data = access_token.get("/1.0/query/nodes")
end
hash = Crack::JSON.parse(data)
nodes = hash.map do |node|
Node.new(node['agent_state'], node['color'], node['id'],