Happy !

Offray / Shortener

Project infos

License MIT
Creation date 2019-01-03

Monticello registration

About Shortener

This is an small wrapper around the ethical shortener service https://is.gd. It works as a practical "real life" exercise for newbies or a a short service to build on top, (like in chatbots or other experiences).


Run this two steps in a playground:

"Start by loading the configuration of Shortener"
  Gofer new
    url: 'http://smalltalkhub.com/mc/Offray/Shortener/main';
    package: 'ConfigurationOfShortener';

"After that load Shortener"
ConfigurationOfShortener load.


  • To shorten a link do:

    Shortener shorten: 'https://pharo.org', which produces something like: 'https://is.gd/cQWvtm'.

  • To enlarge a link do:

    Shortener enlarge: 'https://is.gd/cQWvtm', which, conversely, produces 'https://pharo.org'.

  • To shorten a link with an explicit alias do:

    Shortener shorten: 'https://pharo.org' as: 'pharo', which produces 'https://is.gd/pharo'

    or will raise an error once a short url have been taken. For example, by running the previous example the alias 'pharo' has been taken for all future short urls and can not be used again (you will need to pick a new short url alias).