Update listener callback docblock.

This commit is contained in:
Michael Stenta 2018-11-07 15:29:10 -05:00
parent 04f6d03d34
commit 05d3a82383
1 changed files with 7 additions and 1 deletions

View File

@ -77,11 +77,17 @@ function farm_sensor_listener_mail($key, &$message, $params) {
}
/**
* Callback function for receiving JSON over HTTP and storing data to the {farm_sensor_data} table.
* Callback function for processing GET and POST requests to a listener.
* Handles receiving JSON over HTTP and storing data to the {farm_sensor_data}
* table. Serves data back via API requests with optional parameters.
*
* @param $public_key
* The public key of the sensor that is pushing the data.
*
* The private key should be provided as a URL query string.
*
* Use HTTPS to encrypt data in transit.
*
* JSON should be in the following format:
* {
* "timestamp": 1234567890,