fbbotw.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:fbbotw 作者: JoabMendes 项目源码 文件源码
def post_text_list(fbid, messages=[]):
    """ Sends a serie of messages from a list of texts. The
    messages will be sent in the same order as the list items.

    :usage:

        >>> # Set the user fbid and the list of texts to send.
        >>> fbid = "<user page scoped id>"
        >>> texts = [
                "Hi, Todays forecast is:",
                "Morning: Sunny - 27C",
                "Afternoon: Sunny - 25C",
                "Night: Cloudy - 18C"
            ]
        >>> response = fbbotw.post_text_list(
                fbid=fbid,
                messages=texts
            )
    :param str fbid: User id to send the text list.
    :param list messages: A list of messages to be sent.
    :return: A list of `Response objects <http://docs.python-\
    requests.org/en/master/api/#requests.Response>`_\
    for every message sent.
    """
    responses = []
    for msg in messages:
        responses.append(post_text_message(fbid=fbid, message=msg))
    return responses
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号