1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 22:56:15 +01:00

core.Request: Add from_api() class method

This commit is contained in:
Daniel Mach 2023-02-10 11:04:34 +01:00
parent 09ad87c865
commit 17e25776a2

View File

@ -2967,6 +2967,12 @@ class Action:
class Request:
"""Represents a request (``<request />``)"""
@classmethod
def from_api(cls, apiurl: str, req_id: int):
# TODO: deprecate get_request() or move its content here
req_id = str(req_id)
return get_request(apiurl, req_id)
def __init__(self):
self._init_attributes()