Spaces:
Sleeping
Sleeping
Fix naming
Browse files
main.py
CHANGED
@@ -12,7 +12,7 @@ def start():
|
|
12 |
|
13 |
#Vía Path
|
14 |
@app.get("/getData/")
|
15 |
-
def
|
16 |
data = funciones.getData()
|
17 |
print("Tipo de resultado:", type(data))
|
18 |
return data
|
@@ -20,7 +20,7 @@ def getTokens():
|
|
20 |
#Vía Query
|
21 |
#Quizá no es necesaria vía QUery porque no pide parámetros.
|
22 |
@app.get("/getDataQ/")
|
23 |
-
def
|
24 |
data = funciones.getData()
|
25 |
print("Tipo de resultado:", type(data))
|
26 |
return data
|
@@ -46,14 +46,14 @@ def getTokens(userfile: str = "gAAAAABmEZA4SLBC2YczouOrjIEi9WNCNGOIvyUcqBUnzxNsf
|
|
46 |
|
47 |
#Vía Parameters
|
48 |
@app.get("/authorize/{tokens}/{work}")
|
49 |
-
def
|
50 |
autorizacion = funciones.authorize(tokens, work)
|
51 |
print("Tipo de resultado:", type(autorizacion))
|
52 |
return autorizacion
|
53 |
|
54 |
#Vía Query
|
55 |
@app.get("/authorizeQ/")
|
56 |
-
def
|
57 |
autorizacion = funciones.authorize(tokens,work)
|
58 |
print("Tipo de resultado:", type(autorizacion))
|
59 |
return autorizacion
|
|
|
12 |
|
13 |
#Vía Path
|
14 |
@app.get("/getData/")
|
15 |
+
def getData():
|
16 |
data = funciones.getData()
|
17 |
print("Tipo de resultado:", type(data))
|
18 |
return data
|
|
|
20 |
#Vía Query
|
21 |
#Quizá no es necesaria vía QUery porque no pide parámetros.
|
22 |
@app.get("/getDataQ/")
|
23 |
+
def getData():
|
24 |
data = funciones.getData()
|
25 |
print("Tipo de resultado:", type(data))
|
26 |
return data
|
|
|
46 |
|
47 |
#Vía Parameters
|
48 |
@app.get("/authorize/{tokens}/{work}")
|
49 |
+
def authorize(tokens: int, work: str):
|
50 |
autorizacion = funciones.authorize(tokens, work)
|
51 |
print("Tipo de resultado:", type(autorizacion))
|
52 |
return autorizacion
|
53 |
|
54 |
#Vía Query
|
55 |
@app.get("/authorizeQ/")
|
56 |
+
def authorize(tokens: int, work: str = "picswap"):
|
57 |
autorizacion = funciones.authorize(tokens,work)
|
58 |
print("Tipo de resultado:", type(autorizacion))
|
59 |
return autorizacion
|