Sha256: b293454112d8d49173fe37c0247f4d164744a3580c51683b45e73e7e1ee3f3bc
Contents?: true
Size: 1.61 KB
Versions: 2
Compression:
Stored size: 1.61 KB
Contents
module Rainforest class TestsEndpoint < ApiEndpoint def new(id) Test.new({:id => id}, nil, @client) end def all(params={}, headers={}) method = ApiMethod.new(:get, "/tests", params, headers, @parent) json = @client.execute(method) ApiList.new(:Test, json, method) end def retrieve(test_id, params={}, headers={}) params = ParamsBuilder.merge({ :test_id => test_id, }, params) method = ApiMethod.new(:get, "/tests/:test_id", params, headers, @parent) json = @client.execute(method) Test.new(json, method) end def delete(test_id, params={}, headers={}) params = ParamsBuilder.merge({ :test_id => test_id, }, params) method = ApiMethod.new(:delete, "/tests/:test_id", params, headers, @parent) json = @client.execute(method) json end def update(test_id, params={}, headers={}) params = ParamsBuilder.merge({ :test_id => test_id, }, params) method = ApiMethod.new(:put, "/tests/:test_id", params, headers, @parent) json = @client.execute(method) Test.new(json, method) end def create(params={}, headers={}) method = ApiMethod.new(:post, "/tests", params, headers, @parent) json = @client.execute(method) Test.new(json, method) end def history(test_id, params={}, headers={}) params = ParamsBuilder.merge({ :test_id => test_id, }, params) method = ApiMethod.new(:get, "/tests/:test_id/history", params, headers, @parent) json = @client.execute(method) ApiList.new(:Run, json, method) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rainforest-2.1.0 | lib/rainforest/endpoints/tests_endpoint.rb |
rainforest-2.0.2 | lib/rainforest/endpoints/tests_endpoint.rb |