hipchat.py 文件源码

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

项目:boss 作者: kabirbaidhya 项目源码 文件源码
def send(notif_type, **params):
    ''' Send hipchat notifications. '''

    url = API_BASE_URL.format(
        company_name=config()['company_name'],
        room_id=config()['room_id'],
        auth_token=config()['auth_token']
    )

    (text, color) = notification.get(
        notif_type,
        config=get_config(),
        notif_config=config(),
        create_link=create_link,
        **params
    )

    payload = {
        'color': color,
        'message': text,
        'notify': config()['notify'],
        'message_format': 'html'
    }

    requests.post(url, json=payload)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号