Closed wxn0000 closed 10 years ago
@wxn0000 ok I'll look into the API of tiny.cc
@hzlzh
Hi, thanks for the reply! I actually tried it myself based on your code, and it worked so far.
I added this line to the 2nd block script filter in the workflow:
{'api_url':'http://tiny.cc/?c=rest_api&m=shorten&version=2.0.3&format=json&login=[LOGIN]&apiKey=[API_KEY]&longUrl=','title':'tiny.cc','des':'http://tiny.cc/'}
and these lines to the 3rd block python script:
elif type == 'tiny.cc':
result = json.loads(data)
if(result["errorCode"] == '0'):
output = result["results"]["short_url"]
else:
output = result["errorMessage"]
That's it! I hope I'm doing it right.
And I used this as the favicon:
@wxn0000 Cool~ that's great, LOGIN
and APP key
is needed using tiny.cc
, so users can DIY themselves.
I love this workflow! I don't know if this is the right place for feature request, but it would be nice to have tiny.cc integration as well.
Thanks!!