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