Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for larger Twitter profile images #80

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mgomes
Copy link

@mgomes mgomes commented Jul 6, 2014

Twitter has recently added support for 400x400 thumbnails coinciding with their re-design. This PR adds support for that.

@@ -71,6 +71,8 @@ def image_url
original_url.sub('normal', 'bigger')
when 'original'
original_url.sub('_normal', '')
when '400x400'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@@ -71,6 +71,8 @@ def image_url
original_url.sub('normal', 'bigger')
when 'original'
original_url.sub('_normal', '')
when '400x400'
original_url.sub('normal', '400x400')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@guilhermesimoes
Copy link
Contributor

I don't see that 400x400 size specified anywhere.

Also, the code original_url.sub('400x400', '400x400') does absolutely nothing. It's replacing a string with the exact same string.

@mgomes
Copy link
Author

mgomes commented Jul 6, 2014

I fixed the PR.

It doesn't look like 400x400 is documented in API v1.1. Maybe it'll come soon? 400x400 is the suffix being used for the larger profile images in the new design. Can this be added but maybe not documented until it's officially part of the API?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants