Class: CatsocketClient::Publisher
- Inherits:
-
Struct
- Object
- Struct
- CatsocketClient::Publisher
- Defined in:
- lib/catsocket_client/publisher.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key
4 5 6 |
# File 'lib/catsocket_client/publisher.rb', line 4 def api_key @api_key end |
#url ⇒ Object
Returns the value of attribute url
4 5 6 |
# File 'lib/catsocket_client/publisher.rb', line 4 def url @url end |
Instance Method Details
#publish(channel, data) ⇒ Object
6 7 8 |
# File 'lib/catsocket_client/publisher.rb', line 6 def publish(channel, data) RestClient.post(url, guid: 0, api_key: api_key, channel: channel, data: data ) end |