@@ -2328,7 +2328,7 @@ def path(self, which=None):
23282328 ``super`` is called otherwise.
23292329
23302330 """
2331- if which in ("clone" , "generate" , "schedule_report" , "report_data" ):
2331+ if which in ("clone" , "generate" , "schedule_report" , "report_data" , "export" ):
23322332 prefix = "self"
23332333 return f"{ super ().path (prefix )} /{ which } "
23342334 return super ().path (which )
@@ -2409,6 +2409,24 @@ def report_data(self, synchronous=True, timeout=None, **kwargs):
24092409 response = client .get (temp_path , ** kwargs )
24102410 return _handle_response (response , self ._server_config , synchronous , timeout )
24112411
2412+ def export (self , synchronous = True , timeout = None , ** kwargs ):
2413+ """Export a report template to ERB.
2414+
2415+ :param synchronous: What should happen if the server returns an HTTP
2416+ 202 (accepted) status code? Wait for the task to complete if
2417+ ``True``. Immediately return the server's response otherwise.
2418+ :param timeout: Maximum number of seconds to wait until timing out.
2419+ Defaults to ``nailgun.entity_mixins.TASK_TIMEOUT``.
2420+ :param kwargs: Arguments to pass to requests.
2421+ :returns: The server's response, with all JSON decoded.
2422+ :raises: ``requests.exceptions.HTTPError`` If the server responds with
2423+ an HTTP 4XX or 5XX message.
2424+ """
2425+ kwargs = kwargs .copy () # shadow the passed-in kwargs
2426+ kwargs .update (self ._server_config .get_client_kwargs ())
2427+ response = client .get (self .path ('export' ), ** kwargs )
2428+ return _handle_response (response , self ._server_config , synchronous , timeout )
2429+
24122430
24132431class ContentCredential (
24142432 Entity ,
0 commit comments