Class: Files::ClientLog
- Inherits:
-
Object
- Object
- Files::ClientLog
- Defined in:
- lib/files.com/models/client_log.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
-
.log(params = {}, options = {}) ⇒ Object
Parameters: identifier (required) - string - Client log stream identifier body (required) - string - NDJSON log records.
Instance Method Summary collapse
-
#initialize(attributes = {}, options = {}) ⇒ ClientLog
constructor
A new instance of ClientLog.
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ ClientLog
Returns a new instance of ClientLog.
7 8 9 10 |
# File 'lib/files.com/models/client_log.rb', line 7 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/client_log.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/client_log.rb', line 5 def @options end |
Class Method Details
.log(params = {}, options = {}) ⇒ Object
Parameters:
identifier (required) - string - Client log stream identifier
body (required) - string - NDJSON log records
15 16 17 18 19 20 21 22 23 |
# File 'lib/files.com/models/client_log.rb', line 15 def self.log(params = {}, = {}) raise InvalidParameterError.new("Bad parameter: identifier must be an String") if params[:identifier] and !params[:identifier].is_a?(String) raise InvalidParameterError.new("Bad parameter: body must be an String") if params[:body] and !params[:body].is_a?(String) raise MissingParameterError.new("Parameter missing: identifier") unless params[:identifier] raise MissingParameterError.new("Parameter missing: body") unless params[:body] Api.send_request("/client_logs/log", :post, params, ) nil end |