diff --git a/lib/travis/api/v3/queries/build.rb b/lib/travis/api/v3/queries/build.rb new file mode 100644 index 00000000..7d1594a2 --- /dev/null +++ b/lib/travis/api/v3/queries/build.rb @@ -0,0 +1,10 @@ +module Travis::API::V3 + class Queries::Build < Query + params :id + + def find + return ::Build.find_by_id(id) if id + raise WrongParams + end + end +end diff --git a/lib/travis/api/v3/renderer/build.rb b/lib/travis/api/v3/renderer/build.rb new file mode 100644 index 00000000..14a4c2b0 --- /dev/null +++ b/lib/travis/api/v3/renderer/build.rb @@ -0,0 +1,8 @@ +require 'travis/api/v3/renderer/model_renderer' + +module Travis::API::V3 + class Renderer::Build < Renderer::ModelRenderer + representation(:minimal, :id, :number, :state, :duration, :started_at, :finished_at) + representation(:standard, *representations[:minimal], :repository) + end +end