Skip to content

Commit

Permalink
updated README with GetRantById API example
Browse files Browse the repository at this point in the history
  • Loading branch information
aayushks committed Oct 2, 2017
1 parent f4016f3 commit 83ff883
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Expand Up @@ -8,7 +8,6 @@ devRant API wrapper in Python

```
from pirant import DevRant
devrant = DevRant()
# Get Top 10 Rants
Expand All @@ -22,4 +21,10 @@ print recentRants['rants'][0]['text']
# Get Algo 10 Rants
algoRants = devrant.getRants("algo", 10, 0)
print algoRants['rants'][0]['text']
# Get Rant and all its comments given Rant Id
rant = devrant.getRantById(194632)
print rant['rant']['text']
print rant['comments'][0]['body']
```
2 changes: 1 addition & 1 deletion samples/Demo.py
Expand Up @@ -16,4 +16,4 @@
# Get Rant and all its comments given Rant Id
rant = devrant.getRantById(194632)
print rant['rant']['text']
print rant['comments'][0]['body']
print rant['comments'][0]['body']

0 comments on commit 83ff883

Please sign in to comment.