oauth_verifier required, remove simplejson dependency, update endpoint
* Update `updateProfileBannerImage` to use the v1.1 endpoint * Added `getProfileBannerSizes` method using the GET /users/profile_banner.json endpoint * Fixed a couple of endpoints using variable in the url: * destroyDirectMessage, createBlock, destroyBlock no longer use id in their urls, this shouldn't break anything though. (t.destroyDirectMessage(id=123) should still work) * `oauth_verifier` is now **required** when calling `get_authorized_tokens` * Updated docs - removed getProfileImageUrl docs since it is deprecated. Noted since `Twython` 2.7.0 that users should focus on migrating to v1.1 endpoints since Twitter is deprecating v1 endpoints in May!,
This commit is contained in:
parent
4d7526efc1
commit
abaa3e558a
5 changed files with 27 additions and 46 deletions
18
README.md
18
README.md
|
|
@ -11,7 +11,7 @@ Features
|
|||
- Twitter lists
|
||||
- Timelines
|
||||
- User avatar URL
|
||||
- and anything found in [the docs](https://dev.twitter.com/docs/api)
|
||||
- and anything found in [the docs](https://dev.twitter.com/docs/api/1.1)
|
||||
* Image Uploading!
|
||||
- **Update user status with an image**
|
||||
- Change user avatar
|
||||
|
|
@ -57,7 +57,7 @@ from twython import Twython
|
|||
|
||||
'''
|
||||
oauth_token and oauth_token_secret come from the previous step
|
||||
if needed, store those in a session variable or something
|
||||
if needed, store those in a session variable or something. oauth_verifier from the previous call is now required to pass to get_authorized_tokens
|
||||
'''
|
||||
|
||||
t = Twython(app_key=app_key,
|
||||
|
|
@ -65,7 +65,7 @@ t = Twython(app_key=app_key,
|
|||
oauth_token=oauth_token,
|
||||
oauth_token_secret=oauth_token_secret)
|
||||
|
||||
auth_tokens = t.get_authorized_tokens()
|
||||
auth_tokens = t.get_authorized_tokens(oauth_verifier)
|
||||
print auth_tokens
|
||||
```
|
||||
|
||||
|
|
@ -90,16 +90,6 @@ t = Twython(app_key=app_key,
|
|||
print t.getHomeTimeline()
|
||||
```
|
||||
|
||||
###### Get a user avatar url *(no authentication needed)*
|
||||
|
||||
```python
|
||||
from twython import Twython
|
||||
|
||||
t = Twython()
|
||||
print t.getProfileImageUrl('ryanmcgrath', size='bigger')
|
||||
print t.getProfileImageUrl('mikehelmick')
|
||||
```
|
||||
|
||||
###### Streaming API
|
||||
*Usage is as follows; it's designed to be open-ended enough that you can adapt it to higher-level (read: Twitter must give you access)
|
||||
streams.*
|
||||
|
|
@ -122,6 +112,8 @@ Twython.stream({
|
|||
|
||||
Notes
|
||||
-----
|
||||
Twython (as of 2.7.0) is currently in the process of ONLY supporting Twitter v1.1 endpoints and deprecating all v1 endpoints! Please see the **[Twitter v1.1 API Documentation](https://dev.twitter.com/docs/api/1.1)** to help migrate your API calls!
|
||||
|
||||
As of Twython 2.0.0, we have changed routes for functions to abide by the **[Twitter Spring 2012 clean up](https://dev.twitter.com/docs/deprecations/spring-2012)** Please make changes to your code accordingly.
|
||||
|
||||
Development of Twython (specifically, 1.3)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue