Class: LoggoRails::Client
- Inherits:
-
Object
- Object
- LoggoRails::Client
- Defined in:
- lib/loggo_rails/client.rb
Constant Summary collapse
- API_URL =
'http://localhost:3579'.freeze
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize ⇒ Client
constructor
A new instance of Client.
- #insert(options) ⇒ Object
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
7 8 9 |
# File 'lib/loggo_rails/client.rb', line 7 def initialize @token = Rails.configuration.loggo_rails.token end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
5 6 7 |
# File 'lib/loggo_rails/client.rb', line 5 def token @token end |
Instance Method Details
#insert(options) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/loggo_rails/client.rb', line 11 def insert() RestClient::Request.execute( headers: client_headers, method: :put, url: insert_url, payload: .to_json, verify_ssl: false ) end |