Skip to content

Commit ab69342

Browse files
committed
documentation
1 parent e689752 commit ab69342

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

src/posit/connect/vanities.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Vanity(Resource):
4444
"""
4545

4646
_fuid: str = "content_guid"
47-
"""str : the foreign unique identifier field that points to the owner of this vanity, default is 'content_guid'"""
47+
"""str : the foreign unique identifier field that points to the owner of this vanity, by default 'content_guid'"""
4848

4949
def __init__(
5050
self,
@@ -224,16 +224,28 @@ def set_vanity(self, **attributes) -> None:
224224
Parameters
225225
----------
226226
**attributes : dict, optional
227-
Arbitrary vanity attributes. All attributes are passed as the request body to POST 'v1/content/:guid/vanity'
227+
Arbitrary attributes. All attributes are passed as the request body to POST 'v1/content/:guid/vanity'
228228
229-
Possible keys may include:
230-
- `path` : str
231-
- `force` : bool
229+
Raises
230+
------
231+
ValueError
232+
If the unique identifier field is missing or the value is None.
232233
"""
233234
...
234235

235236
def set_vanity(self, **attributes) -> None:
236-
"""Set the vanity."""
237+
"""Set the vanity.
238+
239+
Parameters
240+
----------
241+
**attributes : dict, optional
242+
Arbitrary attributes. All attributes are passed as the request body to POST 'v1/content/:guid/vanity'
243+
244+
Raises
245+
------
246+
ValueError
247+
If the unique identifier field is missing or the value is None.
248+
"""
237249
v = self.get(self._uid)
238250
if v is None:
239251
raise ValueError(f"Missing value for required field: '{self._uid}'.")

0 commit comments

Comments
 (0)