File: 8-shorturl.rst

package info (click to toggle)
python-flickrapi 2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 468 kB
  • sloc: python: 2,145; makefile: 147; sh: 10
file content (18 lines) | stat: -rw-r--r-- 604 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

Short Flickr URLs
======================================================================

Flickr supports linking to a photo page using a short url such as
http://flic.kr/p/6BTTT6. The ``flickrapi.shorturl`` module contains
functionality for working with those short URLs.

``flickrapi.shorturl.encode(photo ID)``:
    Returns the short ID for this photo ID

``flickrapi.shorturl.encode(short ID)``:
    Returns the photo ID for this short ID

``flickrapi.shorturl.url(photo ID)``:
    Returns the short URL for the given photo ID.

The photo ID, the short ID and the short URL are all unicode strings.