Skip to content

Commit 471044d

Browse files
committed
First commit. Display public timeline from twitter.
0 parents  commit 471044d

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.pyc
2+
*.sublime*
3+
*.wp*
4+
5+

t.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import twitter
2+
import requests, json
3+
4+
def public_timeline(url=None, auth=None):
5+
url = url or "https://api.twitter.com/1/statuses/public_timeline.json"
6+
r = requests.get(url)
7+
return json.loads(r.content)
8+
9+
if __name__ == '__main__':
10+
print public_timeline()

0 commit comments

Comments
 (0)