Class: Txbr::BrazeApi
- Inherits:
-
Object
- Object
- Txbr::BrazeApi
- Includes:
- RequestMethods
- Defined in:
- lib/txbr/braze_api.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#api_url ⇒ Object
readonly
Returns the value of attribute api_url.
Instance Method Summary collapse
- #campaigns ⇒ Object
- #email_templates ⇒ Object
-
#initialize(api_key, api_url, connection: nil) ⇒ BrazeApi
constructor
A new instance of BrazeApi.
Methods included from RequestMethods
#act, #get, #get_json, #post, #post_json, #raise_error!
Constructor Details
#initialize(api_key, api_url, connection: nil) ⇒ BrazeApi
Returns a new instance of BrazeApi.
10 11 12 13 14 |
# File 'lib/txbr/braze_api.rb', line 10 def initialize(api_key, api_url, connection: nil) @api_key = api_key @api_url = api_url @connection = connection end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
8 9 10 |
# File 'lib/txbr/braze_api.rb', line 8 def api_key @api_key end |
#api_url ⇒ Object (readonly)
Returns the value of attribute api_url.
8 9 10 |
# File 'lib/txbr/braze_api.rb', line 8 def api_url @api_url end |
Instance Method Details
#campaigns ⇒ Object
20 21 22 |
# File 'lib/txbr/braze_api.rb', line 20 def campaigns @campaigns ||= CampaignsApi.new(self) end |
#email_templates ⇒ Object
16 17 18 |
# File 'lib/txbr/braze_api.rb', line 16 def email_templates @email_templates ||= EmailTemplatesApi.new(self) end |