Exemplo n.º 1
0
 def __init__(self, api_key: str, api_username: str, base_url: str):
     """
     :param api_key: api_key of the request eg: 'mysendykey'.
     :param api_username: api_username of the request eg: 'mysendyusername'.
     :param base_url:
     """
     api_key = check_api_details(api_key)
     api_username = check_api_details(api_username)
     base_url = check_url(base_url)
     self.api_key = api_key
     self.api_username = api_username
     self.base_url = base_url
     super(Sendy, self).__init__(api_key, api_username, base_url)
Exemplo n.º 2
0
 def test_check_url_6(self):
     self.assertEqual(
         "https://private-faab6-sendypublicapi.apiary-mock.com/v1/",
         check_url(
             "https://private-faab6-sendypublicapi.apiary-mock.com/v1/"))
Exemplo n.º 3
0
 def test_check_url_5(self):
     self.assertEqual("https://api.sendyit.com/v1/",
                      check_url("https://api.sendyit.com/v1/"))