lib/imgur.rb
# Returns statistics for a specific image, like size, type, and bandwidth usage
#
# @param [String] image_hash Imgur's hash of the image
# @raise [ImgurError]
# @return [Hash] Image statistics
Returns statistics for a specific image, like size, type, and bandwidth usage
Returns statistics for a specific image like size type and bandwidth usage
def image_stats image_hash
			c = Curl::Easy.new("http://imgur.com/api/stats/#{image_hash}.json")
			c.http_get
			response = Crack::JSON.parse c.body_str
			raise ImgurError, response["error"]["error_msg"] if response.key?("error")
			response["stats"]
		end
def image_stats image_hash c = Curl :: Easy . new ( "http://imgur.com/api/stats/#{image_hash}.json" ) c . http_get response = Crack :: JSON . parse c . body_str raise ImgurError , response [ "error" ] [ "error_msg" ] if response . key? ( "error" ) response [ "stats" ] end
Returns statistics for a specific image, like size, type, and bandwidth usage
Returns statistics for a specific image like size type and bandwidth usage
None
Hash
None
image_hash
<not_specific>
<not_specific>
image_hash Imgur's hash of the image
image_hash Imgur ' s hash of the image