lib/shorty/bitly.rb
# info - Given a bit.ly url or hash, return information about that page, such as the long source url, ...
Given a bit.ly url or hash, return information about that page, such as the long source url.
Given a bit . ly url or hash return information about that page such as the long source url .
def info(urlorhash, keys = [])
      urlhash = gsub_url(urlorhash)
      if keys != []
        query = {:hash => urlhash, :keys => keys.join(',')}
      else
        query = {:hash => urlhash}
      end
      query.merge!(@options)
      stats = Crack::JSON.parse(self.class.get('/info', :query => query))
      stats["errorCode"].zero? ? stats["results"][urlhash] : raise_error(stats)
    end
def info ( urlorhash , keys = [ ] ) urlhash = gsub_url ( urlorhash ) if keys != [ ] query = { :hash => urlhash , :keys => keys . join ( ',' ) } else query = { :hash => urlhash } end query . merge! ( @options ) stats = Crack :: JSON . parse ( self . class . get ( '/info' , :query => query ) ) stats [ "errorCode" ] . zero? ? stats [ "results" ] [ urlhash ] : raise_error ( stats ) end
info - Given a bit.ly url or hash, return information about that page, such as the long source url, ...
info - Given a bit . ly url or hash return information about that page such as the long source url ...
urlorhash
keys