module Zeus::LogsInterface
Interface for dealing with logs api calls
Public Instance Methods
get_logs(name, options = {})
click to toggle source
get logs @param [String] name a log name @param [Hash] options can contain:
@param [String] attribute_name Name of the attribute within the log to be searched. @param [String] pattern a factor for filtering by name @param [String] from_date a factor for filtering by start timestamp @param [String] to_date a factor for filtering by end timestamp @param [Integer] offset a factor for filtering by metrics name @param [Integer] limit a maximum number of returning values
@return [Zeus::APIClient::Result]
# File lib/zeus/api_client/logs_interface.rb, line 49 def get_logs(name, options = {}) options[:log_name] = name response = get("/logs/#{@access_token}", options) Result.new(response) rescue => e Result.new(e.response) end
send_logs(name, logs)
click to toggle source
send logs @param [String] name a log name @param [Array] logs a list of hash objects @return [Zeus::APIClient::Result]
# File lib/zeus/api_client/logs_interface.rb, line 28 def send_logs(name, logs) params = { logs: logs } begin response = post("/logs/#{@access_token}/#{name}/", params) Result.new(response) rescue => e Result.new(e.response) end end