service.py 文件源码

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

项目:story_engine 作者: brettkromkamp 项目源码 文件源码
def put_interaction(topic_map_identifier, json_body):
    connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
    channel = connection.channel()

    channel.queue_declare(queue='storytechnologies', durable=True)

    # Example messages:
    #   {"type": "scene", "command": "toggle-rotation"}
    #   {"type": "scene", "command": "navigate-to", "sceneIdentifier": "outpost"}
    #   {"type": "animation", "command": "toggle-animation", "animate": "true", "objectIdentifier": "windmill"}

    channel.basic_publish(exchange='',
                          routing_key='storytechnologies',
                          body=json.dumps(json_body))
    connection.close()

# POST /scenes
# POST /scenes/{identifier}/assets
# POST /scenes/{identifier}/attributes
# POST /paths
# POST /characters
# POST /characters/{identifier}/assets
# POST /props
# POST /props/{identifier}/assets
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号