| rev |
line source |
|
sybren@80
|
1 Upgrading from previous versions |
|
sybren@80
|
2 ================================= |
|
sybren@80
|
3 |
|
sybren@170
|
4 From 1.1 |
|
sybren@170
|
5 --------------------------------- |
|
sybren@170
|
6 |
|
sybren@170
|
7 Some methods have been deprecated in version 1.1, which are now |
|
sybren@170
|
8 removed. Those are the class methods: |
|
sybren@170
|
9 |
|
sybren@170
|
10 - test_failure |
|
sybren@170
|
11 - get_printable_error |
|
sybren@170
|
12 - get_rsp_error_code |
|
sybren@170
|
13 - get_rsp_error_msg |
|
sybren@170
|
14 |
|
sybren@170
|
15 The default parser format has been changed from XMLNode to |
|
sybren@170
|
16 ElementTree. Either convert your code to use the new ElementTree |
|
sybren@170
|
17 parser, or pass the ``format='xmlnode'`` parameter to the FlickrAPI |
|
sybren@170
|
18 constructor. |
|
sybren@170
|
19 |
|
sybren@170
|
20 The upload and replace methods now use the format parameter, so if you |
|
sybren@170
|
21 use ElementTree as the parser, you'll now also get an ElementTree |
|
sybren@170
|
22 response from uploading and replacing photos. To keep the old |
|
sybren@170
|
23 behaviour you can pass ``format='xmlnode'`` to those methods. |
|
sybren@170
|
24 |
|
sybren@80
|
25 From 0.15 |
|
sybren@80
|
26 --------------------------------- |
|
sybren@80
|
27 |
|
sybren@80
|
28 A lot of name changes have occurred in version 0.16 to follow PEP 8. |
|
sybren@80
|
29 Some properties have also had their name shortened. For example, an |
|
sybren@80
|
30 ``XMLNode`` now has a ``text`` property instead of ``elementText``. |
|
sybren@80
|
31 After all, the nodes describe XML elements, so what other text would |
|
sybren@80
|
32 there be? |
|
sybren@80
|
33 |
|
sybren@80
|
34 Here is a complete list of the publicly visible changes, broken down |
|
sybren@80
|
35 per class. Changes in the internals of the FlickrAPI aren't documented |
|
sybren@80
|
36 here. |
|
sybren@80
|
37 |
|
sybren@80
|
38 ``FlickrAPI`` |
|
sybren@80
|
39 The constructor has its parameter ``apiKey`` changed to |
|
sybren@80
|
40 ``api_key``. |
|
sybren@80
|
41 |
|
sybren@80
|
42 All methods names that were originally in "camelCase" are now |
|
sybren@80
|
43 written in Python style. For example, ``getTokenPartOne`` has been |
|
sybren@80
|
44 changed to ``get_token_part_one``. The same is true for the class |
|
sybren@80
|
45 variables that point to the Flickr API URLs. For example, |
|
sybren@80
|
46 ``flickrHost`` became ``flickr_host``. |
|
sybren@80
|
47 |
|
sybren@80
|
48 ``send_multipart`` became a private method. |
|
sybren@80
|
49 |
|
sybren@80
|
50 The ``main`` method was removed. It only served as a simple |
|
sybren@80
|
51 example, which was obsoleted by the documentation. |
|
sybren@80
|
52 |
|
sybren@80
|
53 ``XMLNode`` |
|
sybren@80
|
54 The method ``parseXML`` has become ``parse``, since it can't parse |
|
sybren@80
|
55 anything but XML, so there is no need to state the obvious. |
|
sybren@80
|
56 |
|
sybren@80
|
57 Properties ``elementName`` and ``elementText`` have been renamed |
|
sybren@80
|
58 to ``name`` resp. ``text``. |
|
sybren@80
|
59
|