2009-08-14 97 views
0

我想通過python-twitter module更新我的個人資料信息。用python-twitter更新個人資料

>>> api = twitter.Api(username="username", password="password") 
>>> user = api.GetUser(user="username") 
>>> user.SetLocation('New Location') 

的問題是,它不會得到更新和文檔還不清楚,如果有一個步驟我需要做的 - 有一個「保存」,我需要調用或類似的東西?

回答

1

我不相信,蟒蛇,嘰嘰喳喳模塊目前支持更新配置文件。 SetLocation只會更新GetUser返回的本地用戶對象。

這將是比較瑣碎,爲它添加支持的模塊,雖然。看看這個方法:

account/update_profile

,然後添加一個新的方法調用帳戶/ update_profile與更新的用戶數據的API類。

+0

由於看到可用的方法列表,我熟悉的API,只是想知道如果我失蹤真正基本的東西是阻止我保存更改。顯然不是。乾杯。 – 2009-08-14 16:59:43

0

這是一套輪廓從用戶方法:

SetProfileBackgroundColor(self, profile_background_color) 

SetProfileBackgroundImageUrl(self, profile_background_image_url) 

SetProfileBackgroundTile(self, profile_background_tile) 
    Set the boolean flag for whether to tile the profile background image. 

    Args: 
     profile_background_tile: Boolean flag for whether to tile or not. 

SetProfileImageUrl(self, profile_image_url) 
    Set the url of the thumbnail of this user. 

    Args: 
     profile_image_url: The url of the thumbnail of this user 

SetProfileLinkColor(self, profile_link_color) 

SetProfileSidebarFillColor(self, profile_sidebar_fill_color) 

SetProfileTextColor(self, profile_text_color) 

您可以在http://static.unto.net/python-twitter/0.6/doc/twitter.html

+0

Junajo - 你是不是想找深足:SetProfileImageUrl(..)不發出遙控指令,它只是設置在類的數據成員。我將發佈Twitter的LIB在https://github.com/jaytaylor/python-twitter-api的更新版本將實際設定的檔案圖片網址。當我第一次公開發布時,我會盡量記得回到這裏。預計在未來一週左右準備就緒。 – 2011-01-24 22:45:01