Skip to content

Commit

Permalink
Fix documentation for mentions
Browse files Browse the repository at this point in the history
  • Loading branch information
duckduckgrayduck committed Dec 2, 2023
1 parent 751f1fc commit 3d197ac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/documents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,11 @@ Document
.. attribute:: mentions

When the document has been retrieved via a search, this returns a list of
places the search keywords appear in the text. The data are modeled by
their own Python class, :class:`documentcloud.documents.Mention`.
places the search keywords appear in the text. You must pass
mentions = True into the search. The data is modeled by
its own Python class, :class:`documentcloud.documents.Mention`.

>>> obj_list = client.documents.search('Christopher Wallace')
>>> obj_list = client.documents.search('Christopher Wallace', mentions=True)
>>> obj = obj_list[0]
>>> obj.mentions
[<Mention: Page 2>, <Mention: Page 3> ....
Expand Down

0 comments on commit 3d197ac

Please sign in to comment.