Class: BrazeRuby::API

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Endpoints::RemoveEmailAddressesFromSpam

#remove_emails_from_spam

Methods included from Endpoints::RemoveExternalIds

#remove_external_ids

Methods included from Endpoints::RenameExternalIds

#rename_external_ids

Methods included from Endpoints::CreateUserAliases

#create_user_aliases

Methods included from Endpoints::IdentifyUsers

#identify_users

Methods included from Endpoints::Subscription

#subscription_status_get, #subscription_status_set, #subscription_user_status

Methods included from Endpoints::Canvas

#canvas_details, #trigger_canvas_send

Methods included from Endpoints::Campaigns

#delete_campaign_trigger_schedule, #trigger_campaign_schedule, #trigger_campaign_send

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, #scheduled_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, options = {}) ⇒ API

Returns a new instance of API.



46
47
48
49
50
# File 'lib/braze_ruby/api.rb', line 46

def initialize(api_key, braze_url, options = {})
  @api_key = api_key || configuration.rest_api_key
  @braze_url = braze_url || configuration.rest_url
  @options = options || configuration.options
end

Instance Attribute Details

#api_keyObject (readonly)

Returns the value of attribute api_key.



44
45
46
# File 'lib/braze_ruby/api.rb', line 44

def api_key
  @api_key
end

#braze_urlObject (readonly)

Returns the value of attribute braze_url.



44
45
46
# File 'lib/braze_ruby/api.rb', line 44

def braze_url
  @braze_url
end

#optionsObject (readonly)

Returns the value of attribute options.



44
45
46
# File 'lib/braze_ruby/api.rb', line 44

def options
  @options
end

Instance Method Details

#export_users(**payload) ⇒ Object



36
37
38
# File 'lib/braze_ruby/api.rb', line 36

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

#list_segmentsObject



40
41
42
# File 'lib/braze_ruby/api.rb', line 40

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