Class: BrazeRuby::API

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Endpoints::DeleteUsers

#delete_users, #delete_users_action

Methods included from Endpoints::EmailSync

#email_hard_bounces, #email_unsubscribes

Methods included from Endpoints::EmailStatus

#email_status, #email_status_service

Methods included from Endpoints::ScheduleMessages

#schedule_messages

Methods included from Endpoints::SendMessages

#send_messages

Methods included from Endpoints::TrackUsers

#track_attribute, #track_event, #track_purchase, #track_users

Methods included from Deprecated

#schedule_message, #send_message, #track

Constructor Details

#initialize(api_key, braze_url) ⇒ API

Returns a new instance of API.



30
31
32
33
# File 'lib/braze_ruby/api.rb', line 30

def initialize(api_key, braze_url)
  @api_key = api_key
  @braze_url = braze_url
end

Instance Attribute Details

#api_key ⇒ Object (readonly)

Returns the value of attribute api_key.



28
29
30
# File 'lib/braze_ruby/api.rb', line 28

def api_key
  @api_key
end

#braze_url ⇒ Object (readonly)

Returns the value of attribute braze_url.



28
29
30
# File 'lib/braze_ruby/api.rb', line 28

def braze_url
  @braze_url
end

Instance Method Details

#export_users(**payload) ⇒ Object



20
21
22
# File 'lib/braze_ruby/api.rb', line 20

def export_users(**payload)
  BrazeRuby::REST::ExportUsers.new(braze_url).perform(api_key, payload)
end

#list_segments ⇒ Object



24
25
26
# File 'lib/braze_ruby/api.rb', line 24

def list_segments
  BrazeRuby::REST::ListSegments.new(braze_url).perform(api_key)
end