[Building Sakai] Short URLs in sakai 2.8

Adam Marshall adam.marshall at oucs.ox.ac.uk
Thu Feb 23 05:20:32 PST 2012


Thanks steve

From: Steve Swinsburg [mailto:steve.swinsburg at gmail.com]
Sent: 23 February 2012 12:00
To: Adam Marshall
Cc: sakai-dev at collab.sakaiproject.org
Subject: Re: [Building Sakai] Short URLs in sakai 2.8

Hi Adam,

By default it is a no-op.

You need to configure which shortening method to use (randomised and bit.ly<http://bit.ly> built in) via sakai.properties. There is the full reference here:
https://confluence.sakaiproject.org/display/SHRTURL/Home

But what you want is this:

## RANDOMISED

# Uncomment this to use the built in URL randomiser/shortener (recommended)

#shortenedurl.implementation=org.sakaiproject.shortenedurl.api.RandomisedUrlService



## BIT.LY<http://BIT.LY>

# Uncomment this to use the bit.ly<http://bit.ly> URL shortener

#shortenedurl.implementation=org.sakaiproject.shortenedurl.api.BitlyUrlService



# You must also have a bitly account. So signup, navigate to http://bit.ly/a/your_api_key, retrieve your details, uncomment and set the following:

#shortenedurl.implementation.bitly.login=johnsmith

#shortenedurl.implementation.bitly.key=123qwe456asd789zxc

The easiest way to get up and running is to just choose the top one.

For resources using the url shortener, no, but what you describe was something I've always wanted to do.

cheers,
Steve


On 23/02/2012, at 10:26 PM, Adam Marshall wrote:


I see there is a url EB API in Sakai 2.8. I have some questions

Question #1.

I supplied this:

http://cod.oucs.ox.ac.uk:30080/direct/url/shorten.json?path=http://cod.oucs.ox.ac.uk:40080/access/content/group/af6362c5-fcdf-473b-9c4c-5d79127dfaef/Economics/Michaelmas%20Week%201/AdamVines2009.pdf

and got his back

http://cod.oucs.ox.ac.uk:40080/access/content/group/af6362c5-fcdf-473b-9c4c-5d79127dfaef/Economics/Michaelmas Week 1/AdamVines2009.pdf

Am I using it incorrectly, if so how is one supposed to call the API?

Question #2

Has anybody integrated this with Resources > Edit Details - I was hoping that the long ugly URL in the "web Address" 'copy box' would be a shortened URL that had been generated by using this service.

adam
_______________________________________________
sakai-dev mailing list
sakai-dev at collab.sakaiproject.org<mailto:sakai-dev at collab.sakaiproject.org>
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org<mailto:sakai-dev-unsubscribe at collab.sakaiproject.org> with a subject of "unsubscribe"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120223/fb0d92f3/attachment.html 


More information about the sakai-dev mailing list