lib/bitly/v3/url.rb in bitly-0.9.0 vs lib/bitly/v3/url.rb in bitly-0.10.0
- old
+ new
@@ -112,9 +112,13 @@
@clicks_by_day = full_url.clicks_by_day
end
@clicks_by_day
end
+ def jmp_url
+ @short_url.nil? ? nil : @short_url.gsub(/bit\.ly/,'j.mp')
+ end
+
# QR code is automatically created and can be incorporated
# into mobile applications.
def qrcode_url(opts={})
qrcode = opts.has_key?(:s) ? ".qrcode?s=#{opts[:s]}" : ".qrcode"
@short_url + qrcode