Class: MagicBell::Client

Inherits:
Object
  • Object
show all
Includes:
ApiOperations
Defined in:
lib/magicbell/client.rb

Defined Under Namespace

Classes: HTTPError

Instance Method Summary collapse

Methods included from ApiOperations

#get, #post, #put

Instance Method Details

#authentication_headersObject



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