Spaces:
Sleeping
Sleeping
Add path and query parameters
Browse files
main.py
CHANGED
|
@@ -4,7 +4,7 @@ import funciones
|
|
| 4 |
app = FastAPI()
|
| 5 |
|
| 6 |
@app.get("/")
|
| 7 |
-
def
|
| 8 |
|
| 9 |
return {"Status":"Deployed"}
|
| 10 |
|
|
@@ -14,8 +14,20 @@ def getTokens(userfile: str):
|
|
| 14 |
print("Tipo de resultado:", type(tokens))
|
| 15 |
return tokens
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
@app.get("/debitTokens/{userfile}/{work}")
|
| 18 |
def debitTokens(userfile: str, work: str):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
tokens = funciones.debitTokens(userfile,work)
|
| 20 |
print("Tipo de resultado:", type(tokens))
|
| 21 |
return tokens
|
|
|
|
| 4 |
app = FastAPI()
|
| 5 |
|
| 6 |
@app.get("/")
|
| 7 |
+
def start():
|
| 8 |
|
| 9 |
return {"Status":"Deployed"}
|
| 10 |
|
|
|
|
| 14 |
print("Tipo de resultado:", type(tokens))
|
| 15 |
return tokens
|
| 16 |
|
| 17 |
+
@app.get("/getTokensQ/")
|
| 18 |
+
def getTokens(userfile: str = "gAAAAABmEZA4SLBC2YczouOrjIEi9WNCNGOIvyUcqBUnzxNsftXTdy54KaX9x8mAjFkABSI6FJrdZDQKk_5lpJOgJoMChxlniw=="):
|
| 19 |
+
tokens = funciones.getAccess(userfile)
|
| 20 |
+
print("Tipo de resultado:", type(tokens))
|
| 21 |
+
return tokens
|
| 22 |
+
|
| 23 |
@app.get("/debitTokens/{userfile}/{work}")
|
| 24 |
def debitTokens(userfile: str, work: str):
|
| 25 |
+
tokens = funciones.debitTokens(userfile,work)
|
| 26 |
+
print("Tipo de resultado:", type(tokens))
|
| 27 |
+
return tokens
|
| 28 |
+
|
| 29 |
+
@app.get("/debitTokensQ/")
|
| 30 |
+
def debitTokens(userfile: str, work: str = "picswap"):
|
| 31 |
tokens = funciones.debitTokens(userfile,work)
|
| 32 |
print("Tipo de resultado:", type(tokens))
|
| 33 |
return tokens
|