Spaces:
Sleeping
Sleeping
| import funciones | |
| from fastapi import FastAPI | |
| app = FastAPI() | |
| def start(): | |
| return {"Status":"Deployed"} | |
| ## GET DATA (USERS) ## | |
| #Vía Path | |
| def getData(aplicacion: str): | |
| data = funciones.getData(aplicacion) | |
| return data | |
| #Vía Query | |
| def getData(aplicacion: str): | |
| data = funciones.getData(aplicacion) | |
| return data | |
| ## GET TOKENS ## | |
| #Vía Path | |
| def getTokens(userfile: str, env: str): | |
| tokens = funciones.getTokens(userfile, env) | |
| return tokens | |
| #Vía Query | |
| def getTokens(userfile: str = "gAAAAABmEZA4SLBC2YczouOrjIEi9WNCNGOIvyUcqBUnzxNsftXTdy54KaX9x8mAjFkABSI6FJrdZDQKk_5lpJOgJoMChxlniw==", env: str = "dev"): | |
| tokens = funciones.getTokens(userfile, env) | |
| return tokens | |
| ## AUTHORIZE WORK ## | |
| #Vía Parameters | |
| def authorize(tokens: int, work: str): | |
| autorizacion = funciones.authorize(tokens, work) | |
| return autorizacion | |
| #Vía Query | |
| def authorize(tokens: int, work: str = "picswap"): | |
| autorizacion = funciones.authorize(tokens,work) | |
| return autorizacion | |
| ## DEBIT TOKENS ## | |
| #Vía Parámeters | |
| def debitTokens(userfile: str, work: str, env: str): | |
| tokens = funciones.debitTokens(userfile,work, env) | |
| return tokens | |
| #Vía Query | |
| def debitTokens(userfile: str, work: str = "picswap", env: str = "dev"): | |
| tokens = funciones.debitTokens(userfile,work, env) | |
| return tokens | |
| ## CONTROL QUOTA ## | |
| #Vía Parámeters | |
| def getQuota(): | |
| quota = funciones.getQuota() | |
| return quota | |
| #Vía Query | |
| def getQuota(): | |
| quota = funciones.getQuota() | |
| return quota | |
| #Vía Parámeters | |
| def updateQuota(costo_proceso: int): | |
| quota = funciones.updateQuota(costo_proceso) | |
| return quota | |
| #Vía Query | |
| def updateQuota(costo_proceso: int): | |
| quota = funciones.updateQuota(costo_proceso) | |
| return quota | |
| ## GET USER Novelty ## | |
| #Vía Parámeters | |
| def getUserNovelty(userfile: str, aplicacion: str): | |
| novelty = funciones.getUserNovelty(userfile, aplicacion) | |
| return novelty | |
| #Vía Query | |
| def getUserNovelty(userfile: str, aplicacion: str): | |
| novelty = funciones.getUserNovelty(userfile, aplicacion) | |
| return novelty |