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:
parent
09ad87c865
commit
17e25776a2
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user