download :orig images from twitter instead of :large
This commit is contained in:
@@ -16,7 +16,7 @@ module Sources::Strategies
|
|||||||
attrs = TwitterService.new.client.status(url).attrs
|
attrs = TwitterService.new.client.status(url).attrs
|
||||||
@artist_name = attrs[:user][:name]
|
@artist_name = attrs[:user][:name]
|
||||||
@profile_url = "https://twitter.com/" + attrs[:user][:screen_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
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ module Sources
|
|||||||
end
|
end
|
||||||
|
|
||||||
should "get the image url" do
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ module Sources
|
|||||||
end
|
end
|
||||||
|
|
||||||
should "get the image url" do
|
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
|
end
|
||||||
|
|
||||||
should "get the tags" do
|
should "get the tags" do
|
||||||
|
|||||||
Reference in New Issue
Block a user