rekbun / bitlyj

Automatically exported from code.google.com/p/bitlyj
0 stars 0 forks source link

Could it be made to work with j.mp ? #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is not a bug as such but a request for enhancement.

http://j.mp is done by the same people behind bit.ly, could the API also
work with this?

That would be great!
Thank you

Benoit

Original issue reported on code.google.com by beno...@gmail.com on 6 Oct 2009 at 2:29

GoogleCodeExporter commented 9 years ago
I just committed r15 with minor changes to support j.mp. I added tests that 
cover 3
simple methods (info, status, expand), which all work. The actual /shortening/ 
hasn't
been tested. Try if you don't mind, and let me know if shortening works. Thanks!

Original comment by ch...@rosaloves.com on 7 Oct 2009 at 2:37

GoogleCodeExporter commented 9 years ago
Hi,

I'm using revision 17

It does call j.mp and does get a hash from j.mp.

Unfortunately it does not work as the method BitlyImpl creates an instance of 
BitlyUrlImpl which builds the short URL based on hardcoded bit.ly strings.

this.shortUrl = new URL(Bitly.URL + "/"
   + (userHash.length() == 0 ? hash : userHash));

Could you fix that? or would you like me to provide a patch?

Thanks for this great library

Benoit

Original comment by beno...@gmail.com on 7 Oct 2009 at 7:43

GoogleCodeExporter commented 9 years ago
I think that your BitlyApi.java should also provide a getUrl() method and that 
be
given to the constructor of BitlyUrlImpl.

It also appear that you have Bitly.URL "http://bit.ly" defined in different 
places.

It is looking very promising, a couple of things to tidy and bingo it will work 
with
j.mp and I will be able to save a FULL 2 characters!  It feels so back to the 
1970s...

Original comment by beno...@gmail.com on 7 Oct 2009 at 7:53

GoogleCodeExporter commented 9 years ago
I forgot to do that last night (late night messiness). I've committed changes to
address this, as well as a live shorten test against j.mp (it works). Odd that 
the
same api account seems to work across both applications, but whatever. Let me 
know if
you see any other jmp related bugs, and thanks for helping squash!

Original comment by ch...@rosaloves.com on 7 Oct 2009 at 9:32

GoogleCodeExporter commented 9 years ago
Hi Chris

It seems to be working! Cool, saved 2 characters!

http://SpotifyChart.info will be using it shortly!

By the way, have you had a chance to look at issue 4?

Regards from London

Original comment by beno...@gmail.com on 7 Oct 2009 at 10:32

GoogleCodeExporter commented 9 years ago

Original comment by ch...@rosaloves.com on 8 Oct 2009 at 12:57