Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Pling - A Flexible Notification Framework

t6d
December 29, 2011
59

Pling - A Flexible Notification Framework

t6d

December 29, 2011
Tweet

Transcript

  1. Konstantin Tennhard Ruby Developer at flinc Hi, I‘m… Ruby enthusiast

    Bartender Computer Science student Photographer Mountain bike addict Computer Linguist
  2. Messages •API: •#body •Build your own: •#to_pling_message ... are simply

    data containers Pling::Message.new :body => "Hello #rchh!" class MessageLikeThing # your implementation def to_pling_message ::Pling::Message.new(:body => "...") end end
  3. Devices •Represent devices of any kind. •API: •#identifier •#type •Build

    your own: •#to_pling_device ... are simply data containers, too Pling::Device.new :identifier => "...", :type => :iphone class DeviceLikeThing # your implementation def to_pling_device ::Pling::Device.new( :identifier => "...", :type => :iphone ) end end
  4. Gateways •Provider specific! •Support: • iPhone • Android • SMS

    • Email •Build your own: •#deliver!(message, device) ... do the heavy lifting message = Pling::Message.new(...) device = Pling::Device.new(...) gateway = Pling::Gateway.discover(device) gateway.deliver(message, device)