Skip to content

Instantly share code, notes, and snippets.

@jmoody
Created August 31, 2011 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmoody/1183511 to your computer and use it in GitHub Desktop.
Save jmoody/1183511 to your computer and use it in GitHub Desktop.
AgChoice Issue 8: payload specification of trade offer notification (from server)
https://github.com/jmoody/AgChoice/issues/8
{
"aps": {
"alert": {
"loc-args": [
"< commodity >",
"< grade >",
"< volume >",
"< delivery details >",
"< price >"
],
"loc-key": "AG_CHOICE_BID_ALERT_FORMAT",
"action-loc-key": "View"
}
},
"ag": [
"< buyid >",
"< sellid >"
]
}
Example
{
"aps": {
"alert": {
"loc-args": [ "Grain","APH1","5,000","Delivered Depot 20/08-31/12/11", "$188.24"],
"loc-key": "AG_CHOICE_BID_ALERT_FORMAT",
"action-loc-key": "View"
}
},
"ag":["1234567890","0987654321"]
}
{"aps": {"alert": {"loc-args": [ "Grain","APH1","5,000","Delivered Depot 20/08-31/12/11", "$188.24"],"loc-key": "AG_CHOICE_BID_ALERT_FORMAT","action-loc-key": "View"}},"ag":["1234567890","0987654321"]}
Example for Urban Airship
{
"aps": {
"alert": {
"loc-args": [
"Grain",
"APH1",
"5,000",
"Delivered Depot 20/08-31/12/11",
"$188.24"
],
"loc-key": "AG_CHOICE_BID_ALERT_FORMAT",
"action-loc-key": "View"
}
},
"ag": [
"1234567890",
"0987654321"
],
"aliases": [
"mercury-0.0.3"
]
}
{
"aps": {
"alert": {
"loc-args": [
"Grain",
"APH1",
"5,000",
"Delivered Depot 20/08-31/12/11",
"$188.24"
],
"loc-key": "AG_CHOICE_BID_ALERT_FORMAT",
"action-loc-key": "View"
}
},
"ag": [
"1234567890",
"0987654321"
],
"device_tokens": ["2AEE48A00B6154488F5639EB556CFA526CF59F0A35DED50AC60D5E5FF6F3B7D6"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment