本文整理汇总了Python中api.API.put方法的典型用法代码示例。如果您正苦于以下问题:Python API.put方法的具体用法?Python API.put怎么用?Python API.put使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类api.API
的用法示例。
在下文中一共展示了API.put方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: int
# 需要导入模块: from api import API [as 别名]
# 或者: from api.API import put [as 别名]
"""
Print out a server's operation log in the format specified in the
handout.
"""
api.printLog(serverId)
if line[0] == "put":
clientId = int(line[1])
songName = line[2]
URL = line[3]
"""
Instruct the client specified to associate the given URL with the given
songName. This command should block until the client communicates with
one server.
"""
api.put(clientId, songName, URL)
if line[0] == "get":
clientId = int(line[1])
songName = line[2]
"""
Instruct the client specified to attempt to get the URL associated with
the given songName. The value should then be printed to standard out of
the master script in the format specified in the handout. This command
should block until the client communicates with one server.
"""
api.get(clientId, songName)
if line[0] == "delete":
clientId = int(line[1])
songName = line[2]