|
expand url service
feed'n'track's expand url service is also free of charge. it basically
tries to guess whether it knows the corresponding url service, asks it for
the original url and returns it. thus everything here is based on the
aurora framework, the
returning url is encapsulated as requested. what that means is when doing a
http request, you normally place headers to let the client know which output
format you understand. for example using jquery you would do a $.post ( ... )
request, aurora sees that you prefer json and tries to deliver the returned
value as a json encoded string.
in short: it tries to deliver you exactly what you want.
below are some examples which demonstrate how easy it is to use. parameters can be passed as get or post values.
- getting the original url for feed'n'track from tinyurl.com as json:
-
$> curl -H "Accept: application/json" -G -d "url=http://tinyurl.com/feedntrack" "http://feedntrack.de/expand_url"
{"http:\/\/tinyurl.com\/feedntrack":"http:\/\/feedntrack.de"}
- getting the original url for feed'n'track from tinyurl.com as xml:
-
$> curl -H "Accept: text/xml" -G -d "url=http://tinyurl.com/feedntrack" "http://feedntrack.de/expand_url"
<?xml version="1.0"?>
<response encoding="UTF-8">
<http___tinyurl_com_feedntrack name="http://tinyurl.com/feedntrack">http://feedntrack.de</http___tinyurl_com_feedntrack>
</response>
- getting the original url for 2tx from tinyurl.com as json:
-
$> curl -H "Accept: application/json" -G -d "url=http://tinyurl.com/2tx" "http://feedntrack.de/expand_url"
{"http:\/\/tinyurl.com\/2tx":"http:\/\/google.com"}
- getting the original url for my avatar from feed'n'track as json:
-
$> curl -H "Accept: application/json" -G -d "url=http://feedntrack.de/l/1/me" "http://feedntrack.de/expand_url"
{"http:\/\/feedntrack.de\/l\/1\/me":"http:\/\/ok.ryotic.de\/me.png"}
- getting the original url for my avatar from feed'n'track as xml:
-
$> curl -H "Accept: text/xml" -G -d "url=http://feedntrack.de/l/1/me" "http://feedntrack.de/expand_url"
<?xml version="1.0"?>
<response encoding="UTF-8">
<http___feedntrack_de_l_1_me name="http://feedntrack.de/l/1/me">http://ok.ryotic.de/me.png</http___feedntrack_de_l_1_me>
</response>
- getting the original url for my avatar from feed'n'track as yaml:
-
$> curl -H "Accept: text/yaml" -G -d "url=http://feedntrack.de/l/1/me" "http://feedntrack.de/expand_url"
--- %YAML:1.1
http://feedntrack.de/l/1/me: http://ok.ryotic.de/me.png
have fun :).
← back
|