Class: Txbr::BrazeApi

Inherits:
Object
  • Object
show all
Includes:
RequestMethods
Defined in:
lib/txbr/braze_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from RequestMethods

#act, #get, #get_json, #post, #post_json, #raise_error!

Constructor Details

#initialize(api_key, api_url, connection: nil) ⇒ 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_keyObject (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_urlObject (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

#campaignsObject



20
21
22
# File 'lib/txbr/braze_api.rb', line 20

def campaigns
  @campaigns ||= CampaignsApi.new(self)
end

#email_templatesObject



16
17
18
# File 'lib/txbr/braze_api.rb', line 16

def email_templates
  @email_templates ||= EmailTemplatesApi.new(self)
end