Class SpazShortURL

SpazShortURL

Defined in: spazshorturl.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
SpazShortURL(service)

Constructor

Method Summary
Method Attributes Method Name and Description
 
expand(shorturl, opts)

 
expandURLs(urls, target)

 

 
getAPIObj(service)

 

 
replaceExpandableURL(str, shorturl, longurl)

 
saveExpandedURLToCache(shortURL, longURL)

 
shorten(longurl, opts)

shortens a URL by making an ajax call

Class Detail

SpazShortURL(service)

Constructor

Parameters:
{string} service
the name of a service. Preferrably one of the SPAZCORE_SHORTURL_SERVICE_* constants
Method Detail

expand(shorturl, opts)

Parameters:
shorturl
opts

expandURLs(urls, target)

Parameters:
urls
target

findExpandableURLs(str)

Parameters:
str

getAPIObj(service)

Parameters:
service

getExpandedURLFromCache(shortURL)

Parameters:
shortURL

replaceExpandableURL(str, shorturl, longurl)

Parameters:
{string} str
the string to replace the URLs in
{string} shorturl
{string} longurl

saveExpandedURLToCache(shortURL, longURL)

Parameters:
shortURL
longURL

shorten(longurl, opts)

shortens a URL by making an ajax call

Parameters:
{string} longurl
{object} opts
right now opts.event_target (a DOMelement) and opts.apiopts (passed to api's getData() call) are supported