download :orig images from twitter instead of :large

This commit is contained in:
r888888888
2015-02-15 12:24:40 -08:00
parent c92c32ecda
commit bfb9d8358d
2 changed files with 3 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ module Sources::Strategies
attrs = TwitterService.new.client.status(url).attrs
@artist_name = attrs[:user][:name]
@profile_url = "https://twitter.com/" + attrs[:user][:screen_name]
@image_url = attrs[:entities][:media][0][:media_url] + ":large"
@image_url = attrs[:entities][:media][0][:media_url] + ":orig"
end
end
end

View File

@@ -16,7 +16,7 @@ module Sources
end
should "get the image url" do
assert_equal("http://pbs.twimg.com/media/B7jfc1JCcAEyeJh.png:large", @site.image_url)
assert_equal("http://pbs.twimg.com/media/B7jfc1JCcAEyeJh.png:orig", @site.image_url)
end
end
@@ -37,7 +37,7 @@ module Sources
end
should "get the image url" do
assert_equal("http://pbs.twimg.com/media/B4HSEP5CUAA4xyu.png:large", @site.image_url)
assert_equal("http://pbs.twimg.com/media/B4HSEP5CUAA4xyu.png:orig", @site.image_url)
end
should "get the tags" do