'api_key : google api key
url: url of gcm service.
proxy: can be string "http://host:port" or dict {\'https\':\'host:port\'}
timeout: timeout for every HTTP request, see \'requests\' documentation for possible values.'

def __init__(self, api_key, proxy=None, timeout=None, debug=False):

    self.api_key = api_key
    self.url = GCM_URL
    if isinstance(proxy, str):
        protocol = self.url.split(':')[0]
        self.proxy = {protocol: proxy}
    else:
        self.proxy = proxy
    self.timeout = timeout
    self.debug = debug
    self.retry_after = None
    if self.debug:
        GCM.enable_logging()
