Class: BrazeRuby::API
- Inherits:
-
Object
- Object
- BrazeRuby::API
- Includes:
- Deprecated, Endpoints::Campaigns, Endpoints::Canvas, Endpoints::Catalogs, Endpoints::CreateUserAliases, Endpoints::DeleteUsers, Endpoints::EmailStatus, Endpoints::EmailSync, Endpoints::IdentifyUsers, Endpoints::RemoveEmailAddressesFromSpam, Endpoints::RemoveExternalIds, Endpoints::RenameExternalIds, Endpoints::ScheduleMessages, Endpoints::SendMessages, Endpoints::Subscription, Endpoints::TrackUsers
- Defined in:
- lib/braze_ruby/api.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#braze_url ⇒ Object
readonly
Returns the value of attribute braze_url.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #export_users(**payload) ⇒ Object
-
#initialize(api_key = nil, braze_url = nil, options = nil) ⇒ API
constructor
A new instance of API.
- #list_segments ⇒ Object
Methods included from Endpoints::RemoveEmailAddressesFromSpam
Methods included from Endpoints::RemoveExternalIds
Methods included from Endpoints::RenameExternalIds
Methods included from Endpoints::CreateUserAliases
Methods included from Endpoints::IdentifyUsers
Methods included from Endpoints::Subscription
#subscription_status_get, #subscription_status_set, #subscription_user_status
Methods included from Endpoints::Catalogs
#create_catalog_items, #create_catalogs, #delete_catalog, #delete_catalog_items, #list_catalogs, #update_catalog_items
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
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 = nil, braze_url = nil, options = nil) ⇒ API
Returns a new instance of API.
48 49 50 51 52 |
# File 'lib/braze_ruby/api.rb', line 48 def initialize(api_key = nil, braze_url = nil, = nil) @api_key = api_key || BrazeRuby.configuration.rest_api_key @braze_url = braze_url || BrazeRuby.configuration.rest_url @options = || BrazeRuby.configuration. || {} end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
46 47 48 |
# File 'lib/braze_ruby/api.rb', line 46 def api_key @api_key end |
#braze_url ⇒ Object (readonly)
Returns the value of attribute braze_url.
46 47 48 |
# File 'lib/braze_ruby/api.rb', line 46 def braze_url @braze_url end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
46 47 48 |
# File 'lib/braze_ruby/api.rb', line 46 def @options end |
Instance Method Details
#export_users(**payload) ⇒ Object
38 39 40 |
# File 'lib/braze_ruby/api.rb', line 38 def export_users(**payload) BrazeRuby::REST::ExportUsers.new(api_key, braze_url, ).perform(**payload) end |
#list_segments ⇒ Object
42 43 44 |
# File 'lib/braze_ruby/api.rb', line 42 def list_segments BrazeRuby::REST::ListSegments.new(api_key, braze_url, ).perform end |