Group: ipernity API users


Static URLs


Stefan Jenkner
November 13, 2008 - 4 comments - 703 visits

Hi folks,

is there a page which explains ipernity static urls like this?
www.flickr.com/services/api/misc.urls.html

If not, please tell me if I'm wrong. Let's take a picture for example:
u1.ipernity.com/9/71/75/3377175.89f51f59.500.jpg

3377175 = id, fixed; 89f51f59 = secret, fixed; last part = the size;

It is safe to replace the size-part of such url with 75, 100, 240, 500 and 560.
It will always fail for 1024 and above, cause the secret-part changes.
Is this correct?

TIA, Sedden
Comments
Dirk
Dirk
ipernity URLs are somewhat hard to understand ;) ipernity definitely has an URL problem. Well ’ it works, but there is not much beautyness in the “beauty URLs” – not even consistency :(

My documents: www.ipernity.com/doc/dirk
A picture: www.ipernity.com/doc/dirk/3167581
The Thumbnail: u1.ipernity.com/9/75/81/3167581.f888942d.100.jpg

And the same picture if i do an api call:

ipernity.com/doc/19181/3167581

Why is there only the user ID instead of the user name?

And what does “9/75/81” stand for? I guess, “3167581.f888942d” is unique. Why not create a functionality to “wrap” this complicated …

u1.ipernity.com/9/75/81/3167581.f888942d.100.jpg

… to somewhat more easy to recognize like …

www.ipernity.com/doc/dirk/3167581/100
5 years ago.
Christophe Ruelle has replied to Dirk
The user web alias missing in the doc URL is a performance issue. We'll find a way to keep the alias everywhere in the future.

yes, URLs are a bit complicate but we always provide full URLs to avoid questions like "why are urls complicated" LOL
In fact, it's complicate because we use up to 4 different secrets to protect document sizes and medias.
For instance a photo has :
- 1 secret for 75x, 100, 240, 500, 560 sizes
- 1 secret for the 1024
- 1 secret for the original
Most API methods accept the parameter thumbsize to return the desired thumbsize.

For your personal understanding let's analyse u1.ipernity.com/9/75/81/3167581.f888942d.100.jpg :
u1 : the URL server
9 : the RAID volume
75/81 : the last 4 digits of the document ID, used as the directory hash.
3167581 : the document ID
f888942d : the secret
100 : the size

and Yes Dirk, we could provide simpler URLs, but who really cares when you get them already constructed with the API? And even if you like to construct them yourself you can not guess the exact dimensions.

We will definitly make a documentation about this.
5 years ago.
Dirk has replied to Christophe Ruelle
URLs should be “beauty” – It’s nothing rational ;)

Thanks for your explaination!
5 years ago.
Christophe Ruelle has replied to Stefan Jenkner
I've just discovered Django... looks like a very cool framework.
5 years ago.

You must be member of this group to reply to this topic.

» Join ipernity API users