autopush.router.gcmclient
¶
-
class
autopush.router.gcmclient.
GCM
(api_key=None, logger=None, metrics=None, endpoint='gcm-http.googleapis.com/gcm/send', **options)[source]¶ Primitive HTTP GCM service handler.
-
__init__
(api_key=None, logger=None, metrics=None, endpoint='gcm-http.googleapis.com/gcm/send', **options)[source]¶ Initialize the GCM primitive.
Parameters:
-
send
(payload)[source]¶ Send a payload to GCM
Parameters: payload (JSONMessage) – Dictionary of GCM formatted data Returns: Result
-
-
class
autopush.router.gcmclient.
JSONMessage
(registration_ids, collapse_key, time_to_live, dry_run, data)[source]¶ GCM formatted payload
-
class
autopush.router.gcmclient.
Result
(response, message)[source]¶ Abstraction object for GCM response
-
__init__
(response, message)[source]¶ Process GCM message and response into abstracted object
Parameters: - message (JSONMessage) – Message payload
- response (requests.Response) – GCM response
-