Skip to content

Commit 7e28abd

Browse files
Decouple get_api_endpoints from the webapps flavour
1 parent fcfc6f6 commit 7e28abd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pythonanywhere/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ class AuthenticationError(Exception):
2323
pass
2424

2525

26-
def get_api_endpoint():
26+
def get_api_endpoint(flavour="webapps"):
2727
domain = os.environ.get('PYTHONANYWHERE_DOMAIN', 'pythonanywhere.com')
28-
return 'https://www.{domain}/api/v0/user/{{username}}/webapps/'.format(domain=domain)
28+
return 'https://www.{domain}/api/v0/user/{{username}}/{{flavour}}/'.format(domain=domain, flavour=flavour)
2929

3030

3131
def call_api(url, method, **kwargs):

0 commit comments

Comments
 (0)