本文整理汇总了Python中entities.Entity.show方法的典型用法代码示例。如果您正苦于以下问题:Python Entity.show方法的具体用法?Python Entity.show怎么用?Python Entity.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类entities.Entity
的用法示例。
在下文中一共展示了Entity.show方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from entities import Entity [as 别名]
# 或者: from entities.Entity import show [as 别名]
def main():
if len(sys.argv) == 1:
print 'Available Functions:'
print ' --setup'
print
print ' --account/verify_credentials(email, password)'
print ' --account/settings (user_id)'
print ' --account/update_settings (user_id, email, password, privacy, locale, timezone)'
print ' --account/update_profile(user_id, username, name, bio, website, image)'
print ' --account/create(email, password, username, name, privacy)'
print
print ' --blocks/exists (user_id, follower_id)'
print ' --blocks/blocking/ids (user_id)'
print ' --blocks/create (user_id, follower_id)'
print ' --blocks/destroy (user_id, follower_id)'
print
print ' --users/show (user_id)'
print ' --users/lookup (user_ids)'
print ' --users/search (query)'
print ' --users/flag (user_id)'
print
print ' --friends/ids (user_id)'
print ' --followers/ids (user_id)'
print
print ' --friendships/create (user_id, following_id)'
print ' --friendships/destroy (user_id, following_id)'
print ' --friendships/exists (user_id, following_id)'
print ' --friendships/show (user_id, following_id)'
print ' --friendships/incoming (user_id)'
print ' --friendships/outgoing (user_id)'
print
print ' --entities/show (entity_id)'
print ' --entities/create (title, category)'
print ' --entities/destroy (entity_id)'
print ' --entities/update (entity_id, title, category)'
print ' --entities/match (query)'
print
print ' --stamps/create (uid, entity_id, comment)'
print ' --stamps/show (stamp_id)'
print ' --stamps/destroy (stamp_id)'
print ' --stamps/flag (stamp_id, [is_flagged])'
print ' --stamps/read (stamp_id, [user_id], [is_read])'
print
print ' --conversation/show (comment_id)'
print ' --conversation/create (user_id, stamp_id, comment)'
print ' --conversation/destroy (comment_id)'
print ' --conversation/flag (comment_id, [is_flagged])'
print
print ' --mentions/create (stamp_id, user_id)'
print ' --mentions/destroy (stamp_id, user_id)'
print ' --mentions/user (user_id)'
print
print ' --collections/inbox (user_id)'
print ' --collections/user (user_id)'
print ' --collections/add_stamp (stamp_id)'
print
print ' --favorites/show (user_id)'
print ' --favorites/create (stamp_id, user_id)'
print ' --favorites/destroy (stamp_id, user_id)'
print
sys.exit(1)
option = sys.argv[1]
# Setup:
if option == '--setup':
setup.setup()
# Account:
elif option == '--account/verify_credentials':
account = Account()
checkNumberOfArguments(2, len(sys.argv))
response = account.verify_credentials(sys.argv[2], sys.argv[3])
print 'Response: ', response
elif option == '--account/settings':
account = Account()
checkNumberOfArguments(1, len(sys.argv))
response = account.settings(sys.argv[2])
print 'Response: ', response
elif option == '--account/update_settings':
account = Account()
checkNumberOfArguments(6, len(sys.argv))
response = account.update_settings(sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7])
print 'Response: ', response
elif option == '--account/update_profile':
account = Account()
checkNumberOfArguments(6, len(sys.argv))
response = account.update_profile(sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7])
print 'Response: ', response
elif option == '--account/create':
account = Account()
checkNumberOfArguments(5, len(sys.argv))
response = account.create(sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6])
print 'Response: ', response
#.........这里部分代码省略.........