feed_modify.py 文件源码

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

项目:cbapi-examples 作者: cbcommunity 项目源码 文件源码
def main(argv):
    parser = build_cli_parser()
    opts, args = parser.parse_args(argv)
    if not opts.server_url or not opts.token or (not opts.feedname and not opts.feedid):
        print "Missing required param; run with --help for usage"
        print "One of -f or -i must be specified"
        sys.exit(-1)

    # build a cbapi object
    #
    cb = cbapi.CbApi(opts.server_url, token=opts.token, ssl_verify=opts.ssl_verify)

    if not opts.feedid:
      id = cb.feed_get_id_by_name(opts.feedname)
      if id is None:
        print "-> No configured feed with name '%s' found!" % (opts.feedname)
        return
    else:
      id = opts.feedid
      old_feed = cb.feed_info(id)

      #create a new updated feed based on user input

    # create
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号