"url_shortener" is a Ruby gem/library that wraps the Bit.ly API for Ruby applications. A implementation tutorial for the wrapper can be accessed from the GitBug repository. Though not directly supported by Bit.ly, the wrapper is endorsed for use on the Bit.ly developer site. The Bit.ly API allows developers to implement programmatic shortening, URL expansion, sharing, and tracking of links (URLs). Unique user-level and aggregate links can also be created to let users view complete, real-time traffic and referrer data, as well as location and metadata.
PipelineDB recently announced Stride, a realtime analytics API. API access to powerful analytics engines delivers the potential for computers to replace the role of the data scientist. PipelineDB President, Jeff Ferguson, believes Machines Analytics may turn this potential into reality.
At the bottom of many blog posts (including this one) and website entries you're likely to find a widget that allows sharing to social sites or emailing to a friend. ShareThis competes with other systems like AddThis and SocialTwist to give publishers an easy-to-install sharing method.