1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-15 00:36:11 +01:00
github.com_openSUSE_osc/osc/gitea_api/user.py
Daniel Mach 699f4d860e Add 'gitea_api' module
Co-authored-by: Dan Čermák <dcermak@suse.com>
2024-09-24 14:01:43 +02:00

18 lines
389 B
Python

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)