def __init__(self, login, api_key): BaseShortener.__init__(self, api_key) self.login = login self.default_request_params = { 'format': 'json', 'login': self.login, 'apiKey': self.api_key, }
def __init__(self, api_key=None): BaseShortener.__init__(self, api_key=None)
def __init__(self, api_key=None): BaseShortener.__init__(self, api_key) # goo.gl mandates that requests containing JSON content bodies must be # accompanied by a "Content-Type: application/json" request header. # Otherwise, the request will result in an Error (400: Bad Request). self.headers['Content-Type'] = 'application/json'
def __init__(self): BaseShortener.__init__(self, api_key=None) self.default_request_params = { 'format': 'json', } self.service_url = VGD_SERVICE_URL