1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="mirror_v1.html">Google Mirror API</a> . <a href="mirror_v1.subscriptions.html">subscriptions</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#delete">delete(id)</a></code></p> 79<p class="firstline">Deletes a subscription.</p> 80<p class="toc_element"> 81 <code><a href="#insert">insert(body)</a></code></p> 82<p class="firstline">Creates a new subscription.</p> 83<p class="toc_element"> 84 <code><a href="#list">list()</a></code></p> 85<p class="firstline">Retrieves a list of subscriptions for the authenticated user and service.</p> 86<p class="toc_element"> 87 <code><a href="#update">update(id, body)</a></code></p> 88<p class="firstline">Updates an existing subscription in place.</p> 89<h3>Method Details</h3> 90<div class="method"> 91 <code class="details" id="delete">delete(id)</code> 92 <pre>Deletes a subscription. 93 94Args: 95 id: string, The ID of the subscription. (required) 96</pre> 97</div> 98 99<div class="method"> 100 <code class="details" id="insert">insert(body)</code> 101 <pre>Creates a new subscription. 102 103Args: 104 body: object, The request body. (required) 105 The object takes the form of: 106 107{ # A subscription to events on a collection. 108 "kind": "mirror#subscription", # The type of resource. This is always mirror#subscription. 109 "notification": { # A notification delivered by the API. # Container object for notifications. This is not populated in the Subscription resource. 110 "itemId": "A String", # The ID of the item that generated the notification. 111 "collection": "A String", # The collection that generated the notification. 112 "verifyToken": "A String", # The secret verify token provided by the service when it subscribed for notifications. 113 "userToken": "A String", # The user token provided by the service when it subscribed for notifications. 114 "userActions": [ # A list of actions taken by the user that triggered the notification. 115 { # Represents an action taken by the user that triggered a notification. 116 "type": "A String", # The type of action. The value of this can be: 117 # - SHARE - the user shared an item. 118 # - REPLY - the user replied to an item. 119 # - REPLY_ALL - the user replied to all recipients of an item. 120 # - CUSTOM - the user selected a custom menu item on the timeline item. 121 # - DELETE - the user deleted the item. 122 # - PIN - the user pinned the item. 123 # - UNPIN - the user unpinned the item. 124 # - LAUNCH - the user initiated a voice command. In the future, additional types may be added. UserActions with unrecognized types should be ignored. 125 "payload": "A String", # An optional payload for the action. 126 # 127 # For actions of type CUSTOM, this is the ID of the custom menu item that was selected. 128 }, 129 ], 130 "operation": "A String", # The type of operation that generated the notification. 131 }, 132 "updated": "A String", # The time at which this subscription was last modified, formatted according to RFC 3339. 133 "collection": "A String", # The collection to subscribe to. Allowed values are: 134 # - timeline - Changes in the timeline including insertion, deletion, and updates. 135 # - locations - Location updates. 136 # - settings - Settings updates. 137 "verifyToken": "A String", # A secret token sent to the subscriber in notifications so that it can verify that the notification was generated by Google. 138 "userToken": "A String", # An opaque token sent to the subscriber in notifications so that it can determine the ID of the user. 139 "operation": [ # A list of operations that should be subscribed to. An empty list indicates that all operations on the collection should be subscribed to. Allowed values are: 140 # - UPDATE - The item has been updated. 141 # - INSERT - A new item has been inserted. 142 # - DELETE - The item has been deleted. 143 # - MENU_ACTION - A custom menu item has been triggered by the user. 144 "A String", 145 ], 146 "id": "A String", # The ID of the subscription. 147 "callbackUrl": "A String", # The URL where notifications should be delivered (must start with https://). 148 } 149 150 151Returns: 152 An object of the form: 153 154 { # A subscription to events on a collection. 155 "kind": "mirror#subscription", # The type of resource. This is always mirror#subscription. 156 "notification": { # A notification delivered by the API. # Container object for notifications. This is not populated in the Subscription resource. 157 "itemId": "A String", # The ID of the item that generated the notification. 158 "collection": "A String", # The collection that generated the notification. 159 "verifyToken": "A String", # The secret verify token provided by the service when it subscribed for notifications. 160 "userToken": "A String", # The user token provided by the service when it subscribed for notifications. 161 "userActions": [ # A list of actions taken by the user that triggered the notification. 162 { # Represents an action taken by the user that triggered a notification. 163 "type": "A String", # The type of action. The value of this can be: 164 # - SHARE - the user shared an item. 165 # - REPLY - the user replied to an item. 166 # - REPLY_ALL - the user replied to all recipients of an item. 167 # - CUSTOM - the user selected a custom menu item on the timeline item. 168 # - DELETE - the user deleted the item. 169 # - PIN - the user pinned the item. 170 # - UNPIN - the user unpinned the item. 171 # - LAUNCH - the user initiated a voice command. In the future, additional types may be added. UserActions with unrecognized types should be ignored. 172 "payload": "A String", # An optional payload for the action. 173 # 174 # For actions of type CUSTOM, this is the ID of the custom menu item that was selected. 175 }, 176 ], 177 "operation": "A String", # The type of operation that generated the notification. 178 }, 179 "updated": "A String", # The time at which this subscription was last modified, formatted according to RFC 3339. 180 "collection": "A String", # The collection to subscribe to. Allowed values are: 181 # - timeline - Changes in the timeline including insertion, deletion, and updates. 182 # - locations - Location updates. 183 # - settings - Settings updates. 184 "verifyToken": "A String", # A secret token sent to the subscriber in notifications so that it can verify that the notification was generated by Google. 185 "userToken": "A String", # An opaque token sent to the subscriber in notifications so that it can determine the ID of the user. 186 "operation": [ # A list of operations that should be subscribed to. An empty list indicates that all operations on the collection should be subscribed to. Allowed values are: 187 # - UPDATE - The item has been updated. 188 # - INSERT - A new item has been inserted. 189 # - DELETE - The item has been deleted. 190 # - MENU_ACTION - A custom menu item has been triggered by the user. 191 "A String", 192 ], 193 "id": "A String", # The ID of the subscription. 194 "callbackUrl": "A String", # The URL where notifications should be delivered (must start with https://). 195 }</pre> 196</div> 197 198<div class="method"> 199 <code class="details" id="list">list()</code> 200 <pre>Retrieves a list of subscriptions for the authenticated user and service. 201 202Args: 203 204Returns: 205 An object of the form: 206 207 { # A list of Subscriptions. This is the response from the server to GET requests on the subscription collection. 208 "items": [ # The list of subscriptions. 209 { # A subscription to events on a collection. 210 "kind": "mirror#subscription", # The type of resource. This is always mirror#subscription. 211 "notification": { # A notification delivered by the API. # Container object for notifications. This is not populated in the Subscription resource. 212 "itemId": "A String", # The ID of the item that generated the notification. 213 "collection": "A String", # The collection that generated the notification. 214 "verifyToken": "A String", # The secret verify token provided by the service when it subscribed for notifications. 215 "userToken": "A String", # The user token provided by the service when it subscribed for notifications. 216 "userActions": [ # A list of actions taken by the user that triggered the notification. 217 { # Represents an action taken by the user that triggered a notification. 218 "type": "A String", # The type of action. The value of this can be: 219 # - SHARE - the user shared an item. 220 # - REPLY - the user replied to an item. 221 # - REPLY_ALL - the user replied to all recipients of an item. 222 # - CUSTOM - the user selected a custom menu item on the timeline item. 223 # - DELETE - the user deleted the item. 224 # - PIN - the user pinned the item. 225 # - UNPIN - the user unpinned the item. 226 # - LAUNCH - the user initiated a voice command. In the future, additional types may be added. UserActions with unrecognized types should be ignored. 227 "payload": "A String", # An optional payload for the action. 228 # 229 # For actions of type CUSTOM, this is the ID of the custom menu item that was selected. 230 }, 231 ], 232 "operation": "A String", # The type of operation that generated the notification. 233 }, 234 "updated": "A String", # The time at which this subscription was last modified, formatted according to RFC 3339. 235 "collection": "A String", # The collection to subscribe to. Allowed values are: 236 # - timeline - Changes in the timeline including insertion, deletion, and updates. 237 # - locations - Location updates. 238 # - settings - Settings updates. 239 "verifyToken": "A String", # A secret token sent to the subscriber in notifications so that it can verify that the notification was generated by Google. 240 "userToken": "A String", # An opaque token sent to the subscriber in notifications so that it can determine the ID of the user. 241 "operation": [ # A list of operations that should be subscribed to. An empty list indicates that all operations on the collection should be subscribed to. Allowed values are: 242 # - UPDATE - The item has been updated. 243 # - INSERT - A new item has been inserted. 244 # - DELETE - The item has been deleted. 245 # - MENU_ACTION - A custom menu item has been triggered by the user. 246 "A String", 247 ], 248 "id": "A String", # The ID of the subscription. 249 "callbackUrl": "A String", # The URL where notifications should be delivered (must start with https://). 250 }, 251 ], 252 "kind": "mirror#subscriptionsList", # The type of resource. This is always mirror#subscriptionsList. 253 }</pre> 254</div> 255 256<div class="method"> 257 <code class="details" id="update">update(id, body)</code> 258 <pre>Updates an existing subscription in place. 259 260Args: 261 id: string, The ID of the subscription. (required) 262 body: object, The request body. (required) 263 The object takes the form of: 264 265{ # A subscription to events on a collection. 266 "kind": "mirror#subscription", # The type of resource. This is always mirror#subscription. 267 "notification": { # A notification delivered by the API. # Container object for notifications. This is not populated in the Subscription resource. 268 "itemId": "A String", # The ID of the item that generated the notification. 269 "collection": "A String", # The collection that generated the notification. 270 "verifyToken": "A String", # The secret verify token provided by the service when it subscribed for notifications. 271 "userToken": "A String", # The user token provided by the service when it subscribed for notifications. 272 "userActions": [ # A list of actions taken by the user that triggered the notification. 273 { # Represents an action taken by the user that triggered a notification. 274 "type": "A String", # The type of action. The value of this can be: 275 # - SHARE - the user shared an item. 276 # - REPLY - the user replied to an item. 277 # - REPLY_ALL - the user replied to all recipients of an item. 278 # - CUSTOM - the user selected a custom menu item on the timeline item. 279 # - DELETE - the user deleted the item. 280 # - PIN - the user pinned the item. 281 # - UNPIN - the user unpinned the item. 282 # - LAUNCH - the user initiated a voice command. In the future, additional types may be added. UserActions with unrecognized types should be ignored. 283 "payload": "A String", # An optional payload for the action. 284 # 285 # For actions of type CUSTOM, this is the ID of the custom menu item that was selected. 286 }, 287 ], 288 "operation": "A String", # The type of operation that generated the notification. 289 }, 290 "updated": "A String", # The time at which this subscription was last modified, formatted according to RFC 3339. 291 "collection": "A String", # The collection to subscribe to. Allowed values are: 292 # - timeline - Changes in the timeline including insertion, deletion, and updates. 293 # - locations - Location updates. 294 # - settings - Settings updates. 295 "verifyToken": "A String", # A secret token sent to the subscriber in notifications so that it can verify that the notification was generated by Google. 296 "userToken": "A String", # An opaque token sent to the subscriber in notifications so that it can determine the ID of the user. 297 "operation": [ # A list of operations that should be subscribed to. An empty list indicates that all operations on the collection should be subscribed to. Allowed values are: 298 # - UPDATE - The item has been updated. 299 # - INSERT - A new item has been inserted. 300 # - DELETE - The item has been deleted. 301 # - MENU_ACTION - A custom menu item has been triggered by the user. 302 "A String", 303 ], 304 "id": "A String", # The ID of the subscription. 305 "callbackUrl": "A String", # The URL where notifications should be delivered (must start with https://). 306 } 307 308 309Returns: 310 An object of the form: 311 312 { # A subscription to events on a collection. 313 "kind": "mirror#subscription", # The type of resource. This is always mirror#subscription. 314 "notification": { # A notification delivered by the API. # Container object for notifications. This is not populated in the Subscription resource. 315 "itemId": "A String", # The ID of the item that generated the notification. 316 "collection": "A String", # The collection that generated the notification. 317 "verifyToken": "A String", # The secret verify token provided by the service when it subscribed for notifications. 318 "userToken": "A String", # The user token provided by the service when it subscribed for notifications. 319 "userActions": [ # A list of actions taken by the user that triggered the notification. 320 { # Represents an action taken by the user that triggered a notification. 321 "type": "A String", # The type of action. The value of this can be: 322 # - SHARE - the user shared an item. 323 # - REPLY - the user replied to an item. 324 # - REPLY_ALL - the user replied to all recipients of an item. 325 # - CUSTOM - the user selected a custom menu item on the timeline item. 326 # - DELETE - the user deleted the item. 327 # - PIN - the user pinned the item. 328 # - UNPIN - the user unpinned the item. 329 # - LAUNCH - the user initiated a voice command. In the future, additional types may be added. UserActions with unrecognized types should be ignored. 330 "payload": "A String", # An optional payload for the action. 331 # 332 # For actions of type CUSTOM, this is the ID of the custom menu item that was selected. 333 }, 334 ], 335 "operation": "A String", # The type of operation that generated the notification. 336 }, 337 "updated": "A String", # The time at which this subscription was last modified, formatted according to RFC 3339. 338 "collection": "A String", # The collection to subscribe to. Allowed values are: 339 # - timeline - Changes in the timeline including insertion, deletion, and updates. 340 # - locations - Location updates. 341 # - settings - Settings updates. 342 "verifyToken": "A String", # A secret token sent to the subscriber in notifications so that it can verify that the notification was generated by Google. 343 "userToken": "A String", # An opaque token sent to the subscriber in notifications so that it can determine the ID of the user. 344 "operation": [ # A list of operations that should be subscribed to. An empty list indicates that all operations on the collection should be subscribed to. Allowed values are: 345 # - UPDATE - The item has been updated. 346 # - INSERT - A new item has been inserted. 347 # - DELETE - The item has been deleted. 348 # - MENU_ACTION - A custom menu item has been triggered by the user. 349 "A String", 350 ], 351 "id": "A String", # The ID of the subscription. 352 "callbackUrl": "A String", # The URL where notifications should be delivered (must start with https://). 353 }</pre> 354</div> 355 356</body></html>