Module: MagicBell
- Extended by:
- Forwardable
- Defined in:
- lib/magicbell.rb,
lib/magicbell/client.rb,
lib/magicbell/config.rb,
lib/magicbell/railtie.rb,
lib/magicbell/version.rb,
lib/magicbell/api_resource.rb,
lib/magicbell/api_operations.rb,
lib/magicbell/api_resources/user.rb,
lib/magicbell/singleton_api_resource.rb,
lib/magicbell/action_mailer_extension.rb,
lib/magicbell/api_resource_collection.rb,
lib/magicbell/api_resources/notification.rb,
lib/magicbell/api_resources/user_notification.rb,
lib/magicbell/api_resources/user_notifications.rb,
lib/magicbell/api_resources/user_notification_read.rb,
lib/magicbell/api_resources/user_notifications_read.rb,
lib/magicbell/api_resources/user_notifications_seen.rb,
lib/magicbell/api_resources/user_notification_unread.rb,
lib/magicbell/api_resources/user_notification_preferences.rb
Defined Under Namespace
Modules: ActionMailerExtension, ApiOperations Classes: ApiResource, ApiResourceCollection, Client, Config, Notification, Railtie, SingletonApiResource, User, UserNotification, UserNotificationPreferences, UserNotificationRead, UserNotificationUnread, UserNotifications, UserNotificationsRead, UserNotificationsSeen
Constant Summary collapse
- WIDGET_JAVASCRIPT_URL =
"https://assets.magicbell.io/widget.magicbell.js"- EXTRAS_CSS_URL =
"https://assets.magicbell.io/extras.magicbell.css"- VERSION =
'1.0.2'
Class Method Summary collapse
- .authentication_headers ⇒ Object
- .config ⇒ Object
- .configure {|config| ... } ⇒ Object
-
.hmac(message) ⇒ Object
Calculate HMAC for user’s email.
- .reset_config ⇒ Object
Class Method Details
.authentication_headers ⇒ Object
50 51 52 53 54 55 |
# File 'lib/magicbell.rb', line 50 def authentication_headers { "X-MAGICBELL-API-KEY" => api_key, "X-MAGICBELL-API-SECRET" => api_secret } end |
.configure {|config| ... } ⇒ Object
38 39 40 |
# File 'lib/magicbell.rb', line 38 def configure yield(config) end |
.hmac(message) ⇒ Object
Calculate HMAC for user’s email
58 59 60 61 62 63 |
# File 'lib/magicbell.rb', line 58 def hmac() digest = sha256_digest secret = api_secret Base64.encode64(OpenSSL::HMAC.digest(digest, secret, )).strip end |