There are small typos in:
- docs/usage/advanced_usage.rst
- docs/usage/basic_usage.rst
- docs/usage/special_functions.rst
- docs/usage/starting_out.rst
- tests/test_endpoints.py
- twython/endpoints.py
- twython/streaming/api.py
Fixes:
- Should read `received` rather than `recieved`.
- Should read `paginated` rather than `pagintated`.
- Should read `multiple` rather than `mutiple`.
- Should read `membership` rather than `memberhips`.
- Should read `manipulate` rather than `maninpulate`.
- Should read `explicitly` rather than `explicity`.
- Should read `destroy` rather than `destory`.
- Should read `authentication` rather than `autentication`.
- Should read `actual` rather than `acutal`.
Signed-off-by: Tim Gates <tim.gates@iress.com>
If a tweet had a prefix (@names that it was replying to) then the length
of these is counted in the indices that show the locations of entities
within the tweet. But we were applying those indices to the 'display'
part of the tweet that doesn't include the prefix.
So, if the tweet was:
@bob Please meet @bill
and the prefix was `@bob `, then the indices for linking `@bill`
are something like `17,21`. But we were applying the link around
`@bill` to the display text part of the tweet, which is:
Please meet @bill
And so the indices no longer lined up with `@bill`.
Now they do, and the same for URLs and hashtags.
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.
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.
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.
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
I should have checked for this earlier, ah well, 'tis here now.
Again, basically a copy of the blocking code updated for muting.
Excellent target to test it on too.
update_profile_background_image has been in endpoints.py twice for a
bit, my bad.
Using update_profile_banner_image for the function name to update
profile banner image (that's what it was called previously)