|
8 | 8 | from ..verb import Verb |
9 | 9 |
|
10 | 10 |
|
11 | | -class Tag(Verb): |
| 11 | +class Bridge(Verb): |
| 12 | + |
| 13 | + def __init__( |
| 14 | + self, target_call: str, bridge_complete_url: str=None, |
| 15 | + bridge_complete_method: str=None, |
| 16 | + bridge_complete_fallback_url: str=None, |
| 17 | + bridge_complete_fallback_method: str=None, |
| 18 | + bridge_target_complete_url: str=None, |
| 19 | + bridge_target_complete_method: str=None, |
| 20 | + bridge_target_complete_fallback_url: str=None, |
| 21 | + bridge_target_complete_fallback_method: str=None, |
| 22 | + username: str=None, password: str=None, |
| 23 | + fallback_username: str=None, fallback_password: str=None, |
| 24 | + tag: str=None |
| 25 | + ): |
| 26 | + """Initialize a <Bridge> verb |
| 27 | +
|
| 28 | + Args: |
| 29 | + target_call (str): _description_ |
| 30 | + bridge_complete_url (str, optional): _description_. Defaults to None. |
| 31 | + bridge_complete_method (str, optional): _description_. Defaults to None. |
| 32 | + bridge_complete_fallback_url (str, optional): _description_. Defaults to None. |
| 33 | + bridge_complete_fallback_method (str, optional): _description_. Defaults to None. |
| 34 | + bridge_target_complete_url (str, optional): _description_. Defaults to None. |
| 35 | + bridge_target_complete_method (str, optional): _description_. Defaults to None. |
| 36 | + bridge_target_complete_fallback_url (str, optional): _description_. Defaults to None. |
| 37 | + bridge_target_complete_fallback_method (str, optional): _description_. Defaults to None. |
| 38 | + username (str, optional): _description_. Defaults to None. |
| 39 | + password (str, optional): _description_. Defaults to None. |
| 40 | + fallback_username (str, optional): _description_. Defaults to None. |
| 41 | + fallback_password (str, optional): _description_. Defaults to None. |
| 42 | + tag (str, optional): _description_. Defaults to None. |
| 43 | + """ |
| 44 | + self.attributes = { |
| 45 | + "bridgeCompleteUrl": bridge_complete_url, |
| 46 | + "bridgeCompleteMethod": bridge_complete_method, |
| 47 | + "bridgeCompleteFallbackUrl": bridge_complete_fallback_url, |
| 48 | + "bridgeCompleteFallbackMethod": bridge_complete_fallback_method, |
| 49 | + "bridgeTargetCompleteUrl": bridge_target_complete_url, |
| 50 | + "bridgeTargetCompleteMethod": bridge_target_complete_method, |
| 51 | + "bridgeTargetCompleteFallback_url": bridge_target_complete_fallback_url, |
| 52 | + "bridgeTargetCompleteFallbackMethod": bridge_target_complete_fallback_method, |
| 53 | + "username": username, |
| 54 | + "password": password, |
| 55 | + "fallbackUsername": fallback_username, |
| 56 | + "fallbackUassword": fallback_password, |
| 57 | + "tag": tag |
| 58 | + } |
| 59 | + super().__init__( |
| 60 | + tag="Bridge", |
| 61 | + content=target_call, |
| 62 | + attributes=self.attributes, |
| 63 | + nested_verbs=None |
| 64 | + ) |
12 | 65 |
|
13 | | - # TODO: Finish adding attributes |
14 | | - def __init__(self, target_call, bridge_complete_url=None, bridge_complete_method=None): |
15 | | - super().__init__(tag="Bridge", content=target_call, attributes=None, nested_verbs=None) |
16 | | - |
17 | 66 | def add_verb(self, verb: Verb): |
18 | 67 | raise AttributeError('Adding verbs is not supported by <Bridge>') |
0 commit comments