Skip to content

Engagespot/engagespot-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Engagespot Ruby Gem

The Engagespot Ruby Gem provides a convenient interface for integrating with the Engagespot API in Ruby applications. This gem allows you to send notifications and create or update user profiles easily.

Installation

To install the Engagespot gem, add it to your Gemfile:

gem 'engagespot', '~> 1.0'

Then, run:

bundle install

Alternatively, you can install it via RubyGems:

gem install engagespot

Usage

1. send_notification Function

The easiest way to send notifications in Engagespot is by creating message workflows in Engagespot console and trigger it using this Python library.

require 'engagespot'

# Initialize Engagespot with your API key and secret
engagespot = Engagespot.new(api_key: 'your_api_key', api_secret: 'your_api_secret')

# Send a notification
send_request = {
    notification:{
        workflow: {
            identifier: "workflow-identifier"
        },
    },
    sendTo:{
        recipients: ['user-identifier']
    }
}

response = engagespot.send(send_request)

# Output the result
puts response

2. create_or_update_user Function

The create_or_update_user function allows you to create or update user profiles. Here's how you can use it:

require 'engagespot'

# Initialize Engagespot with your API key and secret
engagespot = Engagespot.new(api_key: 'your_api_key', api_secret: 'your_api_secret')

# Create or update a user profile
result = engagespot.create_or_update_user('user_identifier', profile: { name: 'John Doe', email: 'john@example.com' })

# Output the result
puts result

Detailed Guide

Read Engagespot docs to learn how to build and send notification workflows.

Need Help?

If you need any further assistance or have questions about using the Engagespot Ruby Gem, feel free to join our Discord channel: Engagespot Discord Channel

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages