Include missing models in auto-generated API docs

This commit is contained in:
Mads Marquart
2019-07-03 17:18:54 +02:00
parent 8b47bf3e5d
commit 708869ea93
4 changed files with 75 additions and 26 deletions

View File

@@ -31,7 +31,9 @@ ACONTEXT = {
class Client(object):
"""A client for the Facebook Chat (Messenger).
See https://fbchat.readthedocs.io for complete documentation of the API.
This is the main class of `fbchat`, which contains all the methods you use to
interact with Facebook. You can extend this class, and overwrite the ``on`` methods,
to provide custom event handling (mainly useful while listening).
"""
listening = False
@@ -64,7 +66,7 @@ class Client(object):
session_cookies=None,
logging_level=logging.INFO,
):
"""Initializes and logs in the client
"""Initialize and log in the client.
:param email: Facebook `email`, `id` or `phone number`
:param password: Facebook account password

View File

@@ -99,13 +99,11 @@ class Message(object):
Returns a `Message` object, with the formatted string and relevant mentions.
```
>>> Message.formatMentions("Hey {!r}! My name is {}", ("1234", "Peter"), ("4321", "Michael"))
<Message (None): "Hey 'Peter'! My name is Michael", mentions=[<Mention 1234: offset=4 length=7>, <Mention 4321: offset=24 length=7>] emoji_size=None attachments=[]>
>>> Message.formatMentions("Hey {!r}! My name is {}", ("1234", "Peter"), ("4321", "Michael"))
<Message (None): "Hey 'Peter'! My name is Michael", mentions=[<Mention 1234: offset=4 length=7>, <Mention 4321: offset=24 length=7>] emoji_size=None attachments=[]>
>>> Message.formatMentions("Hey {p}! My name is {}", ("1234", "Michael"), p=("4321", "Peter"))
<Message (None): 'Hey Peter! My name is Michael', mentions=[<Mention 4321: offset=4 length=5>, <Mention 1234: offset=22 length=7>] emoji_size=None attachments=[]>
```
>>> Message.formatMentions("Hey {p}! My name is {}", ("1234", "Michael"), p=("4321", "Peter"))
<Message (None): 'Hey Peter! My name is Michael', mentions=[<Mention 4321: offset=4 length=5>, <Mention 1234: offset=22 length=7>] emoji_size=None attachments=[]>
"""
result = ""
mentions = list()