Module Emitter
An 'Emitter' is a class that can be used to send payloads to a Snowplow collector
attached to a 'tracker' instance.
Info:
- Copyright: Snowplow Analytics Ltd
- License: Apache License Version 2.0
- Author: Greg Leonard
-
get_request_method ()
-
Returns:
string
The Emitter instance request method
-
get_collector_url ()
-
Returns:
string
The Emitter instance collector url
-
send (payload)
-
Sends a payload to the collector with the configured request method.
Parameters:
- payload
string
The payload to send
Returns:
-
boolean
Whether event was successfully collected
-
optional string
The reason for failure if not
-
emitter.new (collector_url[, request_method="POST"])
-
Builds a new emitter instance.
Parameters:
- collector_url
string
The url of the collector
- request_method
string
The request method to use
(default "POST")
Returns:
Emitter
The new emitter instance
-
Emitter
-
The Emitter table.
Fields:
- get_request_method
func
- get_collector_url
func
- send
func