From 62f7f11b3126a53b40291b5cb3afde6db2871af3 Mon Sep 17 00:00:00 2001 From: Dark Boi <66882633+darkdarcool@users.noreply.github.com> Date: Tue, 30 Mar 2021 12:33:06 -0400 Subject: [PATCH] Update main.py --- App/REPLAPI/main.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/App/REPLAPI/main.py b/App/REPLAPI/main.py index 39f9ab2..58c8c4a 100644 --- a/App/REPLAPI/main.py +++ b/App/REPLAPI/main.py @@ -91,11 +91,16 @@ def replit_cycles(name = None): return e except: exit("ERROR: Cannot find " + name + "'s cycles!") - -def replit_langs(name = None): +def replit_langs(name = None, extra = None): + sun = 0 if name == None: exit("ERROR: You didn't fill out the name parameter!") else: + if (extra == None): + pass + else: + if (extra == "all"): + sun = 1 try: link = requests.get('https://replit.com/data/profiles/' +name ) data = link.json() @@ -114,6 +119,9 @@ def replit_langs(name = None): stuff = stuff.replace("]", "") stuff = stuff.replace(" ", "") li = list(stuff.split(",")) + if (sun == 1): + sun = 2 + return li, sun return (li) except: exit("ERROR: Cannot find " + name + "'s langs!") @@ -175,4 +183,4 @@ def replit_comments(name = None): return '\n'.join(all_text) except: exit("ERROR: Cannot find "+name+"'s comments!") -#print(replit_langs("Coder100")) \ No newline at end of file +#print(replit_langs("Coder100"))