Commit graph

843 commits

Author SHA1 Message Date
Phil Gyford
9ccdb48248 Add test for html_for_tweet() for retweets 2017-10-10 12:31:57 +01:00
Phil Gyford
9ade0946b5 Add test for html_for_tweet() for quoted tweets 2017-10-10 12:24:09 +01:00
Phil Gyford
13fd0a8684 Define encoding for tests config file 2017-10-10 11:57:03 +01:00
Mike Helmick
7be654136e Merge pull request #460 from jmdaweb/master
Added create_metadata endpoint
2017-10-09 16:26:01 -04:00
Jose Manuel Delicado
2cb2ed4a31 Twython/api.py: suggested changes in review have been made for pull request 460 2017-10-09 18:11:24 +02:00
Mike Helmick
41a2404b20 Merge pull request #459 from foxmask/patch-1
update the link to the doc of the twitter API
2017-10-09 12:00:47 -04:00
Mike Helmick
c9026247ee Merge pull request #462 from foxmask/master
update the link to the doc of the twitter API
2017-10-09 11:57:33 -04:00
FoxMaSk
89755a8643 update the link to the doc of the twitter API 2017-10-08 08:57:04 +02:00
Phil Gyford
a27efd9da8 Fix html_for_tweet()s handling of media URLs
We were trying to link to each media item using its
`url`/`expanded_url`. But there is only one of these, shared across
all of a tweet's media items. So attempting to put it in several times,
in the same location, was a bit of a mess!

So it now only puts the `url`/`expanded_url` in once, no matter
how many media items there are.
2017-10-07 18:38:20 +01:00
Phil Gyford
1511ee7b4d Split test_html_for_tweet() tests into their own file 2017-10-07 18:08:01 +01:00
Jose Manuel Delicado
6fc7b9e038 Added create_metadata endpoint 2017-10-07 18:29:19 +02:00
Jose Manuel Delicado
748d28cc71 twython/api.py: JSON error is not raised if the response content is empty and the status code is not 204. If params is not a dictionary, _transparent_params is not called 2017-10-07 18:26:21 +02:00
FoxMaSk
e87b80710d update the link to the doc of the twitter API 2017-10-07 16:46:56 +02:00
Mike Helmick
12e6b34d1d Merge pull request #458 from clayadavis/docs_py3k
Update docs to use py3k
2017-10-06 15:27:23 -04:00
Clayton Davis
c086449818 Update StringIO import for py3k 2017-10-06 14:57:36 -04:00
Clayton Davis
4f1e41a9e5 Update print statements to print() functions 2017-10-06 14:45:25 -04:00
Mike Helmick
0702b4bce1 Merge pull request #456 from philgyford/fix-html-for-tweet
Make html_for_tweet() link a replied-to username
2017-10-04 09:00:44 -04:00
Phil Gyford
0ee9b76b5c Make html_for_tweet() link a replied-to username
If a tweet was a reply, then when `html_for_tweet()` tried to turn
the initial "@username" into a link, there was:

    > NameError: name 'sub_expr' is not defined

This is now fixed, with a test to ensure the "@username" becomes
a link.
2017-10-03 19:12:02 +01:00
Mike Helmick
97f78fd89b Merge pull request #453 from clayadavis/master
Raise TypeError when cursor is not provided a callable
2017-09-25 13:48:53 -04:00
Clayton A Davis
6166e86807 Add test for cursor creation 2017-09-11 13:52:43 -04:00
Clayton A Davis
c63ed8559e Improve error handling for api.cursor 2017-09-06 18:30:32 -04:00
Mike Helmick
ede941cf1a Version 3.6.0 and update travis python versions 2017-08-23 11:29:20 -04:00
Mike Helmick
8368956f86 Merge pull request #451 from philgyford/fix-447
Improve replacing of entities with links in `html_for_tweet()`
2017-08-23 09:49:13 -04:00
Phil Gyford
6890802b2a Add test for missing symbols in entities
If a tweet has no `symbols` in its `entities` then `html_for_tweet()`
was failing.

I'm not sure how common this is but, for example, tweets in a downloaded
archive do not have `symbols` for some reason.

The previous change (b366ab5) fixed this, but I'm adding a test
for this case.
2017-08-22 13:55:22 +01:00
Phil Gyford
b366ab55c3 Improve replacing of entities with links in html_for_tweet()
I've re-written the parts of `html_for_tweet()` so that it handles
all the replacements of URLs, mentions, symbols and hashtags better.

Mainly to fix #447 but it should be a little more robust generally.

Shamelessly cribbed from https://stackoverflow.com/a/25514650/250962

Passes all tests, but I haven't checked it beyond that.

Fixes #447
2017-08-22 13:49:40 +01:00
Mike Helmick
5a87fc7d84 Fixes #446, add Python 3 classifier to setup.py 2017-06-16 09:16:22 -04:00
Mike Helmick
574483d870 3.5.0 Release 2017-06-06 10:17:58 -04:00
Mike Helmick
866fb0202a Merge pull request #428 from tushdante/tushdante-video-upload
added media_category and support for STATUS calls
2016-09-30 07:28:38 -04:00
Tushar Bhushan
469432bcf8 - added support for media_category param
- added code to handle empty responses for STATUS calls
2016-09-26 14:22:19 -07:00
Tushar Bhushan
e76a290166 fixed styling issues 2016-09-26 12:51:05 -07:00
Tushar Bhushan
7401adfb64 - Double -> single quotes
- Removed default value from .get()
- Added a check_progress param to upload_video to allow users to decide when to check 'STATUS' calls
2016-09-25 18:03:26 -07:00
Mike Helmick
51be5b7539 Merge pull request #423 from Gageco/patch-1
added get_direct_message example
2016-09-23 09:25:12 -04:00
Mike Helmick
a66268331b Merge pull request #425 from ping/mediaupload_status
Use GET request if the media upload command is STATUS
2016-09-23 09:24:33 -04:00
Mike Helmick
3d3d32f0fc Merge pull request #429 from ping/extended-tweet
Update html_for_tweet to support extended tweets
2016-09-23 09:19:35 -04:00
ping
c57c4bfc34 Update html_for_tweet to support extended tweets 2016-09-20 17:18:21 +08:00
Tushar Bhushan
2c02b622a2 added media_category and support for STATUS calls 2016-09-14 15:35:51 -07:00
Mike Helmick
975095d8d2 Merge pull request #426 from philgyford/bugs/422
Fix upload_video "string argument detected, got 'bytes'" bug.
2016-08-18 11:23:14 -04:00
Phil Gyford
1b20f8f0f9 Fix upload_video "string argument detected, got 'bytes'" bug.
Needed to use BytesIO instead of StringIO when uploading video to Twitter.

Tested with python 2.6.9, 2.7.11, 3.3.6, 3.5.1.

fixes #422
2016-08-17 14:18:59 +01:00
ping
f7ddbcf414 Use GET request if the media upload command is STATUS 2016-06-22 22:20:26 +08:00
Gage Coprivnicar
f91da7cadf added get_direct_message example
added a get_direct_message example hope this is helpful. I spent a lot of time trying to figure it out and figured I could help others with the same problem
2016-06-12 16:42:25 -06:00
Mike Helmick
2faa84629b Merge pull request #415 from philgyford/symbols-in-html-for-tweet
Link $IBM-style symbols in tweets in html_for_tweet()
2016-04-30 05:33:14 -04:00
Mike Helmick
86f878aad8
Fixes #417, update ReadTheDocs TLD in README 2016-04-30 05:31:13 -04:00
Mike Helmick
3f6700373f
3.4.0 release, update version and history 2016-04-30 05:22:26 -04:00
Mike Helmick
6cd13d772e Merge pull request #411 from ping/quoted-status-patch2
Fix issue where is_quote_status is true but there is no quoted_status
2016-04-30 05:14:31 -04:00
Phil Gyford
a1640f4a17 Link $IBM-style symbols in tweets in html_for_tweet()
Fixes #412
2016-04-22 14:22:32 +01:00
ping
99e9cebdc3 Fix issue where is_quote_status is true but there is no quoted_status 2016-03-29 10:44:04 +08:00
Mike Helmick
885051acdc Merge pull request #397 from ping/quoted_status_patch
Fix html_for_tweet for pre-quote implementation
2015-10-12 13:32:52 -04:00
ping
ff4655c314 Fix html_for_tweet for pre-quote implementation tweet html 2015-10-08 11:31:07 +08:00
Mike Helmick
c59de5c1df Merge pull request #396 from akarambir/upload-video-endpoint
Add chunked video upload functionality
2015-10-06 15:29:51 -04:00
Karambir Singh Nain
2cca895079 Add video upload endpoint 2015-09-29 20:57:47 +05:30