Method: Pokan::RequestHandler#pull_message

Defined in:
lib/pokan/request_handler.rb

#pull_message(keys) ⇒ Object

Get a push message containing all status and keys based on the given keys following the structure: Given structure: {key: timestamp, … …}



74
75
76
77
78
79
80
81
82
# File 'lib/pokan/request_handler.rb', line 74

def pull_message(keys)
  { action: 'pull',
    data: {
      newer: newer(keys),
      older: older(keys)
    },
    origin:"#{address}:#{port}" 
  }.to_json
end