Clean up doc references
This commit is contained in:
@@ -38,9 +38,9 @@ ACONTEXT = {
|
||||
class Client:
|
||||
"""A client for the Facebook Chat (Messenger).
|
||||
|
||||
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).
|
||||
This is the main class, 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).
|
||||
"""
|
||||
|
||||
@property
|
||||
@@ -215,7 +215,7 @@ class Client:
|
||||
limit: The max. amount of threads to fetch (default all threads)
|
||||
|
||||
Returns:
|
||||
list: :class:`Thread` objects
|
||||
list: `Thread` objects
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -266,7 +266,7 @@ class Client:
|
||||
threads: Thread: List of threads to check for users
|
||||
|
||||
Returns:
|
||||
list: :class:`User` objects
|
||||
list: `User` objects
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -292,7 +292,7 @@ class Client:
|
||||
"""Fetch all users the client is currently chatting with.
|
||||
|
||||
Returns:
|
||||
list: :class:`User` objects
|
||||
list: `User` objects
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -317,7 +317,7 @@ class Client:
|
||||
limit: The max. amount of users to fetch
|
||||
|
||||
Returns:
|
||||
list: :class:`User` objects, ordered by relevance
|
||||
list: `User` objects, ordered by relevance
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -334,7 +334,7 @@ class Client:
|
||||
name: Name of the page
|
||||
|
||||
Returns:
|
||||
list: :class:`Page` objects, ordered by relevance
|
||||
list: `Page` objects, ordered by relevance
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -352,7 +352,7 @@ class Client:
|
||||
limit: The max. amount of groups to fetch
|
||||
|
||||
Returns:
|
||||
list: :class:`Group` objects, ordered by relevance
|
||||
list: `Group` objects, ordered by relevance
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -370,7 +370,7 @@ class Client:
|
||||
limit: The max. amount of groups to fetch
|
||||
|
||||
Returns:
|
||||
list: :class:`User`, :class:`Group` and :class:`Page` objects, ordered by relevance
|
||||
list: `User`, `Group` and `Page` objects, ordered by relevance
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -441,7 +441,7 @@ class Client:
|
||||
thread_id: User/Group ID to search in. See :ref:`intro_threads`
|
||||
|
||||
Returns:
|
||||
typing.Iterable: Found :class:`Message` objects
|
||||
typing.Iterable: Found `Message` objects
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -457,7 +457,7 @@ class Client:
|
||||
|
||||
Args:
|
||||
query: Text to search for
|
||||
fetch_messages: Whether to fetch :class:`Message` objects or IDs only
|
||||
fetch_messages: Whether to fetch `Message` objects or IDs only
|
||||
thread_limit (int): Max. number of threads to retrieve
|
||||
message_limit (int): Max. number of messages to retrieve
|
||||
|
||||
@@ -531,7 +531,7 @@ class Client:
|
||||
user_ids: One or more user ID(s) to query
|
||||
|
||||
Returns:
|
||||
dict: :class:`User` objects, labeled by their ID
|
||||
dict: `User` objects, labeled by their ID
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -556,7 +556,7 @@ class Client:
|
||||
page_ids: One or more page ID(s) to query
|
||||
|
||||
Returns:
|
||||
dict: :class:`Page` objects, labeled by their ID
|
||||
dict: `Page` objects, labeled by their ID
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -578,7 +578,7 @@ class Client:
|
||||
group_ids: One or more group ID(s) to query
|
||||
|
||||
Returns:
|
||||
dict: :class:`Group` objects, labeled by their ID
|
||||
dict: `Group` objects, labeled by their ID
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -603,7 +603,7 @@ class Client:
|
||||
thread_ids: One or more thread ID(s) to query
|
||||
|
||||
Returns:
|
||||
dict: :class:`Thread` objects, labeled by their ID
|
||||
dict: `Thread` objects, labeled by their ID
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -669,7 +669,7 @@ class Client:
|
||||
before (datetime.datetime): The point from which to retrieve messages
|
||||
|
||||
Returns:
|
||||
list: :class:`Message` objects
|
||||
list: `Message` objects
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -707,7 +707,7 @@ class Client:
|
||||
before (datetime.datetime): The point from which to retrieve threads
|
||||
|
||||
Returns:
|
||||
list: :class:`Thread` objects
|
||||
list: `Thread` objects
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -806,7 +806,7 @@ class Client:
|
||||
thread_id: User/Group ID to get message info from. See :ref:`intro_threads`
|
||||
|
||||
Returns:
|
||||
Message: :class:`Message` object
|
||||
Message: `Message` object
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -837,7 +837,7 @@ class Client:
|
||||
plan_id: Plan ID to fetch from
|
||||
|
||||
Returns:
|
||||
Plan: :class:`Plan` object
|
||||
Plan: `Plan` object
|
||||
|
||||
Raises:
|
||||
FBchatException: If request failed
|
||||
@@ -893,7 +893,7 @@ class Client:
|
||||
thread_id: ID of the thread
|
||||
|
||||
Returns:
|
||||
typing.Iterable: :class:`ImageAttachment` or :class:`VideoAttachment`
|
||||
typing.Iterable: `ImageAttachment` or `VideoAttachment`
|
||||
"""
|
||||
data = {"id": thread_id, "first": 48}
|
||||
thread_id = str(thread_id)
|
||||
@@ -1013,9 +1013,7 @@ class Client:
|
||||
return self.send(Message(text=quick_reply.title, quick_replies=[new]))
|
||||
elif isinstance(quick_reply, QuickReplyLocation):
|
||||
if not isinstance(payload, LocationAttachment):
|
||||
raise TypeError(
|
||||
"Payload must be an instance of `fbchat.LocationAttachment`"
|
||||
)
|
||||
raise TypeError("Payload must be an instance of `LocationAttachment`")
|
||||
return self.send_location(
|
||||
payload, thread_id=thread_id, thread_type=thread_type
|
||||
)
|
||||
@@ -3655,7 +3653,7 @@ class Client:
|
||||
"""Called when the client is listening and client receives information about friend active status.
|
||||
|
||||
Args:
|
||||
statuses (dict): Dictionary with user IDs as keys and :class:`ActiveStatus` as values
|
||||
statuses (dict): Dictionary with user IDs as keys and `ActiveStatus` as values
|
||||
msg: A full set of the data received
|
||||
"""
|
||||
log.debug("Buddylist overlay received: {}".format(statuses))
|
||||
|
@@ -13,7 +13,7 @@ attrs_default = attr.s(slots=True, kw_only=kw_only)
|
||||
|
||||
|
||||
class Enum(aenum.Enum):
|
||||
"""Used internally by ``fbchat`` to support enumerations"""
|
||||
"""Used internally to support enumerations"""
|
||||
|
||||
def __repr__(self):
|
||||
# For documentation:
|
||||
|
@@ -8,7 +8,7 @@ attrs_exception = attr.s(slots=True, auto_exc=True)
|
||||
class FBchatException(Exception):
|
||||
"""Custom exception thrown by ``fbchat``.
|
||||
|
||||
All exceptions in the ``fbchat`` module inherits this.
|
||||
All exceptions in the module inherits this.
|
||||
"""
|
||||
|
||||
message = attr.ib()
|
||||
|
@@ -14,7 +14,7 @@ class Group(Thread):
|
||||
participants = attr.ib(factory=set)
|
||||
#: A dictionary, containing user nicknames mapped to their IDs
|
||||
nicknames = attr.ib(factory=dict)
|
||||
#: A :class:`ThreadColor`. The groups's message color
|
||||
#: A `ThreadColor`. The groups's message color
|
||||
color = attr.ib(None)
|
||||
#: The groups's default emoji
|
||||
emoji = attr.ib(None)
|
||||
|
@@ -80,9 +80,9 @@ class Message:
|
||||
|
||||
#: The actual message
|
||||
text = attr.ib(None)
|
||||
#: A list of :class:`Mention` objects
|
||||
#: A list of `Mention` objects
|
||||
mentions = attr.ib(factory=list)
|
||||
#: A :class:`EmojiSize`. Size of a sent emoji
|
||||
#: A `EmojiSize`. Size of a sent emoji
|
||||
emoji_size = attr.ib(None)
|
||||
#: The message ID
|
||||
uid = attr.ib(None)
|
||||
@@ -92,15 +92,15 @@ class Message:
|
||||
created_at = attr.ib(None)
|
||||
#: Whether the message is read
|
||||
is_read = attr.ib(None)
|
||||
#: A list of people IDs who read the message, works only with :func:`fbchat.Client.fetch_thread_messages`
|
||||
#: A list of people IDs who read the message, works only with `Client.fetch_thread_messages`
|
||||
read_by = attr.ib(factory=list)
|
||||
#: A dictionary with user's IDs as keys, and their :class:`MessageReaction` as values
|
||||
#: A dictionary with user's IDs as keys, and their `MessageReaction` as values
|
||||
reactions = attr.ib(factory=dict)
|
||||
#: A :class:`Sticker`
|
||||
#: A `Sticker`
|
||||
sticker = attr.ib(None)
|
||||
#: A list of attachments
|
||||
attachments = attr.ib(factory=list)
|
||||
#: A list of :class:`QuickReply`
|
||||
#: A list of `QuickReply`
|
||||
quick_replies = attr.ib(factory=list)
|
||||
#: Whether the message is unsent (deleted for everyone)
|
||||
unsent = attr.ib(False)
|
||||
|
@@ -8,7 +8,7 @@ class Poll:
|
||||
|
||||
#: Title of the poll
|
||||
title = attr.ib()
|
||||
#: List of :class:`PollOption`, can be fetched with :func:`fbchat.Client.fetch_poll_options`
|
||||
#: List of `PollOption`, can be fetched with `Client.fetch_poll_options`
|
||||
options = attr.ib()
|
||||
#: Options count
|
||||
options_count = attr.ib(None)
|
||||
|
@@ -83,7 +83,7 @@ class Thread:
|
||||
last_active = attr.ib(None)
|
||||
#: Number of messages in the thread
|
||||
message_count = attr.ib(None)
|
||||
#: Set :class:`Plan`
|
||||
#: Set `Plan`
|
||||
plan = attr.ib(None)
|
||||
|
||||
@staticmethod
|
||||
|
@@ -63,7 +63,7 @@ class User(Thread):
|
||||
nickname = attr.ib(None)
|
||||
#: The clients nickname, as seen by the user
|
||||
own_nickname = attr.ib(None)
|
||||
#: A :class:`ThreadColor`. The message color
|
||||
#: A `ThreadColor`. The message color
|
||||
color = attr.ib(None)
|
||||
#: The default emoji
|
||||
emoji = attr.ib(None)
|
||||
|
Reference in New Issue
Block a user