require 'travis/api/app'

class Travis::Api::App
  class Endpoint
    # Logs are generated by builds.
    class Logs < Endpoint
      include Helpers
      # Fetches a log by its *id*.
      get '/:id' do |id|
        respond_with service(:find_log, params)
      end

      # Clears up the content of the log by the *job id*
      # Optionally takes parameter *reason*
      patch '/:id' do |id|
        patch_log_for_job(id, params)
      end
    end
  end
end