implement requests

This commit is contained in:
carlad 2015-08-21 14:39:28 +02:00
parent e9d11056c0
commit 8ef0a2d8e5
3 changed files with 12 additions and 1 deletions

View File

@ -0,0 +1,8 @@
require 'travis/api/v3/renderer/model_renderer'
module Travis::API::V3
class Renderer::Request < Renderer::ModelRenderer
representation(:minimal, :id)
representation(:standard, :id, :repository, :commit, :owner, :created_at, :result, :message, :event_type)
end
end

View File

@ -5,7 +5,7 @@ module Travis::API::V3
Accounts = Module.new { extend Services } Accounts = Module.new { extend Services }
Branch = Module.new { extend Services } Branch = Module.new { extend Services }
Build = Module.new { extend Services } Build = Module.new { extend Services }
Builds = Module.new { extend Services } Builds = Module.new { extend Services }
Organization = Module.new { extend Services } Organization = Module.new { extend Services }
Organizations = Module.new { extend Services } Organizations = Module.new { extend Services }
Owner = Module.new { extend Services } Owner = Module.new { extend Services }

View File

@ -1,4 +1,7 @@
module Travis::API::V3 module Travis::API::V3
class Services::Requests::Find < Service class Services::Requests::Find < Service
def run!
query.find(find(:repository))
end
end end
end end