arturoqu / python-twitter

Automatically exported from code.google.com/p/python-twitter
Apache License 2.0
0 stars 0 forks source link

Feature-Request: TinyURL replacement #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call on the TinyURL API to replace the long URL of the string to a 
tinyurl.
2. twitter.api(user, password, argv.sys[1]) 
3. ' check my site at http://www.google.com/?translate....' -> ' check my 
site at http://tinyurl.com/asDsKJ1'

Looking around I found that is rather simple since TinyURL has an API on 
itself.
http://www.scripting.com/stories/2007/06/27/tinyurlHasAnApi.html

Only thing needed would be a return function that replace the long url 
with it's tinyurl.

Original issue reported on code.google.com by acolor...@gmail.com on 6 Jul 2008 at 6:04

GoogleCodeExporter commented 9 years ago
Seems like a useful feature, but does it belong in the Twitter API wrapper 
itself?

Original comment by dclinton on 10 Jul 2008 at 9:51

GoogleCodeExporter commented 9 years ago
I think it does since the goal is to make it as usable as possible. Having long 
urls
and having the message default to error because the URL is too long seems like 
a bug
to me. Having this small yet useful thing will seems like a error handler 
(preventer). 

Alternatively I would like to see the message gets split into sequential 
messages.
Usually that's the way SMS works once u exceed a certain number, the message 
will
split  the messsage between the number of SMS necessary.

Original comment by acolor...@gmail.com on 11 Jul 2008 at 7:13

GoogleCodeExporter commented 9 years ago

Original comment by dclinton on 21 Jan 2009 at 7:52

GoogleCodeExporter commented 9 years ago
@acolorado
About splitting messages, acolorado, you can check issue 40. I made a little 
patch
and placed there.
On wrapping tinyurl, does not seem to be difficult! Maybe on that spare time?
:)

Regards,
Rogério Schneider

Original comment by stockrt on 24 Feb 2009 at 1:17

GoogleCodeExporter commented 9 years ago
Find a patch attached for simple function to accomplish this. 

Call api.ShortenUrl([url]) and a string is returned of the tinyurl for that 
URL. 

Original comment by ghi...@gmail.com on 17 Apr 2009 at 2:26

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by dclinton on 26 Apr 2009 at 5:56

GoogleCodeExporter commented 9 years ago
Added the beginnings of this in changeset

http://code.google.com/p/python-twitter/source/detail?r=6b05622a2e1a6a8ca0e082e4
61ad2cef2d4f6c38

TinyURL example and the framework for more

Original comment by bear42 on 16 May 2010 at 11:03