class documentation

class ACMEViewRequest(VerticalScroll):

Constructor: ACMEViewRequest(id, title, header, originator, ...)

View In Hierarchy

View to display request.

Method __init__ Initialize the view.
Method buttonExecute Execute the callback.
Method compose Compose the view.
Method prepareRequest Prepare the request for an operation.
Method resourceText.setter Set the resource text.
Method runRequest Run the request on a resource.
Method selectChanged Handle the select change.
Method showCurlDialog Show the current request as cURL command.
Method updateOriginator Update the originator.
Method updateResourceView Update the selected resource.
Class Variable factory Injected Factory instance.
Class Variable requestManager Injected RequestManager instance.
Class Variable validator Injected Validator instance.
Instance Variable border_title The border title. Inherited from the parent class.
Instance Variable button The button to submit the request.
Instance Variable callback The callback for the button action.
Instance Variable childResources The child resource select view.
Instance Variable enableEditor Enable the editor.
Instance Variable header The header label.
Instance Variable inputOriginator The input originator.
Instance Variable operation The operation for the request.
Instance Variable resourceText Return the resource text.
Instance Variable resourceTextArea The resource text area.
Instance Variable responseView The response view.
Instance Variable selectCallback The callback for the select change.
Property childResourceType Return the selected child resource type.
Property originator Return the originator.
Instance Variable _app The application.
def __init__(self, id: str, title: str, header: str, originator: str, buttonLabel: str, buttonVariant: ButtonVariant | None = 'primary', callback: Callable | None = None, enableEditor: bool = True, operation: Operation = Operation.CREATE, selectCallback: Callable | None = None, responseView: ACMEViewResponse | None = None):

Initialize the view.

Parameters
id:strThe view ID.
title:strThe title of the view.
header:strThe header text.
originator:strThe originator.
buttonLabel:strThe label of the button.
buttonVariant:ButtonVariant | NoneThe button variant.
callback:Callable | NoneThe callback for the button action
enableEditor:boolEnable the editor.
operation:OperationThe operation for the request.
selectCallback:Callable | NoneThe callback for the select change.
responseView:ACMEViewResponse | NoneThe response view.
@on(Button.Pressed, '#request-button')
def buttonExecute(self):

Execute the callback.

def compose(self) -> ComposeResult:

Compose the view.

Yields
The view content.
def prepareRequest(self, targetResource: Resource) -> JSON | None:

Prepare the request for an operation.

Parameters
targetResource:ResourceThe resource to target.
Returns
JSON | NoneThe request structure.
def resourceText(self, resource: str):

Set the resource text.

Parameters
resource:strThe resource text.
def runRequest(self, resource: Resource) -> Result | None:

Run the request on a resource.

Parameters
resource:ResourceThe resource to target.
Returns
Result | NoneThe result.
@on(Select.Changed)
def selectChanged(self, event: Select.Changed):

Handle the select change.

Parameters
event:Select.ChangedThe select change event.
def showCurlDialog(self, resource: Resource):

Show the current request as cURL command.

def updateOriginator(self, originator: str, suggestions: list[str] = []):

Update the originator.

Parameters
originator:strThe originator.
suggestions:list[str]The suggestions.
def updateResourceView(self, resource: Resource, resourceType: ResourceTypes, requestOriginator: str | None = None):

Update the selected resource.

Parameters
resource:ResourceThe selected resource.
resourceType:ResourceTypesUndocumented
requestOriginator:str | NoneUndocumented
factory: Factory =

Injected Factory instance.

requestManager: RequestManager =

Injected RequestManager instance.

validator: Validator =

Injected Validator instance.

border_title =

The border title. Inherited from the parent class.

button =

The button to submit the request.

callback =

The callback for the button action.

childResources =

The child resource select view.

enableEditor =

Enable the editor.

header =

The header label.

inputOriginator =

The input originator.

operation =

The operation for the request.

@property
resourceText: str =

Return the resource text.

Returns
The resource text.
resourceTextArea =

The resource text area.

responseView =

The response view.

selectCallback =

The callback for the select change.

@property
childResourceType: ResourceTypes | None =

Return the selected child resource type.

Returns
The selected child resource type.
@property
originator: str =

Return the originator.

Returns
The originator.
_app =

The application.