Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 30th, 2012  |  syntax: None  |  size: 3.04 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ATT API Notification Resource
  2. <script type="text/javascript">
  3. ATT.Request(
  4.     "notification",
  5.     "post",
  6.     function(){ //do stuff here },
  7.     {"access_token" : my_access_token_here},
  8.     {
  9.       "interfaces": [
  10.                 {
  11.                           "interface_id": 1
  12.                         },
  13.                 {
  14.                           "interface_id": 2
  15.                 },
  16.                 {
  17.                           "interface_id": 3
  18.                 },
  19.                 {
  20.                           "interface_id": 4
  21.                 }
  22.       ],
  23.       "custom_body": "This is a wonderful trip!",
  24.       "target_response_info_type": "activity",
  25.       "message_type": "22",
  26.       "interfaces_custom_body": [
  27.                 {
  28.                           "interface_id": 1,
  29.                           "custom_subject": "none",
  30.                           "custom_body": "This is a wonderful trip!"
  31.                 },
  32.                 {
  33.                           "interface_id": 2,
  34.                           "custom_subject": "none",
  35.                           "custom_body": "This is a wonderful trip!"
  36.                 },
  37.                 {
  38.                           "interface_id": 3,
  39.                           "custom_subject": "none",
  40.                           "custom_body": "This is a wonderful trip!"
  41.                 },
  42.                 {
  43.                           "interface_id": 4,
  44.                           "custom_subject": "none",
  45.                           "custom_body": "This is a wonderful trip!"
  46.                 }
  47.       ],
  48.       "do_not_send": "0"
  49.    }
  50. );
  51. </script>
  52.        
  53. <script type="text/javascript">
  54. ATT.Request(
  55.     "trip/13427/messages",
  56.     "get",
  57.     replaceWithYourOwnCallback,
  58.     {"access_token" : "197d39aeb300c0a4b5e0b6a4d9624d0a"},
  59.     postparams = null
  60. );
  61. </script>
  62.        
  63. {"access_token" : my_access_token_here},
  64. {
  65.   "related_object_type": "trip",
  66.   "related_object_id": "13427",
  67.   "interfaces": [
  68.             {
  69.                       "interface_id": 1
  70.                     },
  71.             {
  72.                       "interface_id": 2
  73.             },
  74.             {
  75.                       "interface_id": 3
  76.             },
  77.             {
  78.                       "interface_id": 4
  79.             }
  80.   ],
  81.   "custom_body": "This is a wonderful trip!",
  82.   "target_response_info_type": "activity",
  83.   "message_type": "22",
  84.   "interfaces_custom_body": [
  85.             {
  86.                       "interface_id": 1,
  87.                       "custom_subject": "none",
  88.                       "custom_body": "This is a wonderful trip!"
  89.             },
  90.             {
  91.                       "interface_id": 2,
  92.                       "custom_subject": "none",
  93.                       "custom_body": "This is a wonderful trip!"
  94.             },
  95.             {
  96.                       "interface_id": 3,
  97.                       "custom_subject": "none",
  98.                       "custom_body": "This is a wonderful trip!"
  99.             },
  100.             {
  101.                       "interface_id": 4,
  102.                       "custom_subject": "none",
  103.                       "custom_body": "This is a wonderful trip!"
  104.             }
  105.   ],
  106.   "do_not_send": "0"