A python library for interacting with Teknik Services
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

util.py 388B

12345678910111213141516171819
  1. from urllib.parse import urljoin
  2. defaultUrl = 'https://api.teknik.io/v1/'
  3. defaultUsername = ''
  4. defaultToken = ''
  5. def GetUrl(url, service):
  6. finalUrl = ''
  7. if url is None or url == '':
  8. url = defaultUrl
  9. server = service.lower()
  10. if service == 'upload':
  11. finalUrl = urljoin(url, 'Upload')
  12. elif service == 'paste':
  13. finalUrl = urljoin(url, 'Paste')
  14. return finalUrl