@@ -70,7 +70,6 @@ def __init__(
7070 super ().__init__ (params , ** kwargs )
7171 self ._after_destroy = after_destroy
7272 self ._content_guid = kwargs ["content_guid" ]
73- self .__endpoint = self .params .url + f"v1/content/{ self ._content_guid } /vanity"
7473
7574 def destroy (self ) -> None :
7675 """Destroy the vanity.
@@ -88,7 +87,8 @@ def destroy(self) -> None:
8887 ----
8988 This action requires administrator privileges.
9089 """
91- self .params .session .delete (self .__endpoint )
90+ endpoint = self .params .url + f"v1/content/{ self ._content_guid } /vanity"
91+ self .params .session .delete (endpoint )
9292
9393 if self ._after_destroy :
9494 self ._after_destroy ()
@@ -125,7 +125,6 @@ class HasGuid(TypedDict):
125125 def __init__ (self , params : ResourceParameters , ** kwargs : Unpack [HasGuid ]):
126126 super ().__init__ (params , ** kwargs )
127127 self ._content_guid = kwargs ["guid" ]
128- self .__endpoint = self .params .url + f"v1/content/{ self ._content_guid } /vanity"
129128 self ._vanity : Optional [Vanity ] = None
130129
131130 @property
@@ -214,8 +213,8 @@ def create_vanity(self, **kwargs: Unpack[CreateVanityRequest]) -> Vanity:
214213 --------
215214 If setting force=True, the destroy operation performed on the other vanity is irreversible.
216215 """
217- print ( self .__endpoint )
218- response = self .params .session .put (self . __endpoint , json = kwargs )
216+ endpoint = self .params . url + f"v1/content/ { self . _content_guid } /vanity"
217+ response = self .params .session .put (endpoint , json = kwargs )
219218 result = response .json ()
220219 return Vanity (self .params , ** result )
221220
@@ -226,7 +225,7 @@ def find_vanity(self) -> Vanity:
226225 -------
227226 Vanity
228227 """
229- print ( self .__endpoint )
230- response = self .params .session .get (self . __endpoint )
228+ endpoint = self .params . url + f"v1/content/ { self . _content_guid } /vanity"
229+ response = self .params .session .get (endpoint )
231230 result = response .json ()
232231 return Vanity (self .params , ** result )
0 commit comments