1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

publish: 5.9.2

This commit is contained in:
Steffo 2020-06-28 23:52:20 +02:00
parent b57c26046f
commit 4e6c2d9ed3
Signed by: steffo
GPG key ID: 896A80F55F7C97F0
5 changed files with 28 additions and 3 deletions

View file

@ -2,7 +2,7 @@
[tool.poetry]
name = "royalpack"
version = "5.9.1"
version = "5.9.2"
description = "A Royalnet command pack for the Royal Games community"
authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"]
license = "AGPL-3.0+"

View file

@ -95,7 +95,7 @@ class EatCommand(Command):
"gelato di steffo": "🍨 Hai provato a rubare il {food}...\n[i]...Ma sei arrivato tardi: l'ha già mangiato.[/i]",
"biscotto": "🍪 Hai mangiato un {food} di contrabbando.\n[i]L'Inquisizione non lo saprà mai![/i]",
"biscotti": "🍪 Hai mangiato tanti {food} di contrabbando.\n[i]Attento! L'Inquisizione è sulle tue tracce![/i]",
"crocchette di pollo": "🍗 Hai mangiato {food]!\n[i]Dio porco maledetto, infame, CAPRA, porca Madonna, Dio cane, "
"crocchette di pollo": "🍗 Hai mangiato {food}!\n[i]Dio porco maledetto, infame, CAPRA, porca Madonna, Dio cane, "
"HAI PERSO. UN POMERIGGIO PER C- ooh se è questo dio cane, altro che sfondamento dei cieli "
"*roba non capibile*, sfondi tutti dio can li distruggi, non ci rimane più niente.[/i]",

View file

@ -11,6 +11,7 @@ from .api_poll_list import ApiPollsListStar
from .api_cvstats_latest import ApiCvstatsLatestStar
from .api_cvstats_avg import ApiCvstatsAvgStar
from .api_user_ryg import ApiUserRygStar
from .api_user_ryg_list import ApiUserRygListStar
# Enter the PageStars of your Pack here!
available_page_stars = [
@ -26,6 +27,7 @@ available_page_stars = [
ApiCvstatsLatestStar,
ApiCvstatsAvgStar,
ApiUserRygStar,
ApiUserRygListStar,
]
# Don't change this, it should automatically generate __all__

View file

@ -0,0 +1,23 @@
from starlette.responses import *
import royalnet.utils as ru
import royalnet.backpack.tables as rbt
import royalnet.constellation.api as rca
class ApiUserRygListStar(rca.ApiStar):
path = "/api/user/ryg/list/v1"
tags = ["user"]
@rca.magic
async def get(self, data: rca.ApiData) -> ru.JSON:
"""Get Royalpack information about all user."""
users: typing.List[rbt.User] = await ru.asyncify(data.session.query(self.alchemy.get(rbt.User)).all)
return [{
**user.json(),
"bio": user.bio.json() if user.bio is not None else None,
"fiorygi": user.fiorygi.fiorygi if user.fiorygi is not None else None,
"steam": [steam.json() for steam in user.steam],
"leagueoflegends": [leagueoflegends.json() for leagueoflegends in user.leagueoflegends],
"trivia": user.trivia_score.json() if user.trivia_score is not None else None
} for user in users]

View file

@ -1 +1 @@
semantic = "5.9.1"
semantic = "5.9.2"