本文整理汇总了Python中tumblr.Tumblr.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Python Tumblr.setTitle方法的具体用法?Python Tumblr.setTitle怎么用?Python Tumblr.setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tumblr.Tumblr
的用法示例。
在下文中一共展示了Tumblr.setTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from tumblr import Tumblr [as 别名]
# 或者: from tumblr.Tumblr import setTitle [as 别名]
print 'isItMe() False: invalid url'
sys.exit()
if not b.authenticate():
print "Authentication failed"
sys.exit()
print "My available tags:"
for tag in b.getTags():
print tag
print "My available categories:"
for cat in b.getCategories():
print cat
b.setTitle('draft title')
b.setContent('draft content')
# technology exists and was retrieved through getCategories, but
# business doesn't exist so behind the scenes it must be added to
# the system and linked with this post somehow
catList = ['technology', 'business']
b.setCategories(catList)
# The same might happen here if a tag is new
tagsList = ['技术', '商业']
b.setTags(tagsList)
b.setAttachment('/home/marcelo/file.jpg')
if b.postEntry():