Class: MagicBell::Client
- Inherits:
-
Object
- Object
- MagicBell::Client
- Includes:
- ApiOperations
- Defined in:
- lib/magicbell/client.rb
Defined Under Namespace
Classes: HTTPError
Instance Method Summary collapse
- #authentication_headers ⇒ Object
- #create_notification(notification_attributes) ⇒ Object
-
#user_with_email(email) ⇒ Object
def user(user_id) MagicBell::User.find(user_id) end.
Methods included from ApiOperations
Instance Method Details
#authentication_headers ⇒ Object
25 26 27 |
# File 'lib/magicbell/client.rb', line 25 def authentication_headers MagicBell.authentication_headers end |
#create_notification(notification_attributes) ⇒ Object
12 13 14 |
# File 'lib/magicbell/client.rb', line 12 def create_notification(notification_attributes) MagicBell::Notification.create(self, notification_attributes) end |
#user_with_email(email) ⇒ Object
def user(user_id)
MagicBell::User.find(user_id)
end
20 21 22 23 |
# File 'lib/magicbell/client.rb', line 20 def user_with_email(email) client = self MagicBell::User.new(client, "email" => email) end |