rate.py 文件源码

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

项目:two1-python 作者: 21dotco 项目源码 文件源码
def rate(ctx, list, app_id, rating):
    """Rate an app listed in the 21 Marketplace.
\b
Usage
_____
Rate an app.
$ 21 rate Xe8 3
    - Xe8 is the id of the app that you want to rate.  This id can be found with `21 search`.
    - 3 is the rating to apply. A rating should be an integer between 1-5.
You can update the rating for an app at anytime with `21 rate`.
\b
List all the apps that you have rated.
$ 21 rate --list
"""
    # pylint: disable=redefined-builtin
    if list:
        _list(ctx.obj["client"])
    else:
        if not (app_id and isinstance(rating, int)):
            # print help and exit
            logger.info(ctx.command.help)
            return
        _rate(ctx.obj["client"], app_id, rating)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号