Last active
August 29, 2015 14:07
-
-
Save aratakokubun/1248a2f46c9ccd7abd79 to your computer and use it in GitHub Desktop.
Qiita APIを触ってみた ref: http://qiita.com/aratakokubun/items/78c4d8392ab6fe20bb1e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client = Client(url_name = self.user_name, password = self.user_pass) | |
token = client.token # post等はここで取得したtokenを使用 | |
users = Users() | |
user_items = users.user_items(url_name=self.user_name, params={'page':1, 'per_page':100}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [42]: time_str = '2014-10-11 23:34:14 +0900' | |
In [43]: time = datetime.strptime(time_str[:-6], '%Y-%m-%d %H:%M:%S') | |
In [44]: (datetime.now() - time).days | |
Out[44]: 7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment