1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-15 08:36:13 +01:00
github.com_openSUSE_osc/osc/gitea_api/user.py

18 lines
389 B
Python
Raw Normal View History

from .connection import Connection
from .connection import GiteaHTTPResponse
class User:
@classmethod
def get(
cls,
conn: Connection,
) -> GiteaHTTPResponse:
"""
Retrieve details about the current user.
:param conn: Gitea ``Connection`` instance.
"""
url = conn.makeurl("user")
return conn.request("GET", url)