diff options
-rw-r--r-- | CHANGELOG.rst | 33 | ||||
-rw-r--r-- | README.rst | 80 | ||||
-rw-r--r-- | docs/conf.py | 4 | ||||
-rw-r--r-- | docs/index.rst | 6 | ||||
-rw-r--r-- | setup.py | 4 |
5 files changed, 78 insertions, 49 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6ac15c6..e6a8675 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst | |||
@@ -2,6 +2,39 @@ A note on versioning: This librarys major version will grow with the APIs | |||
2 | version number. Breaking changes will be indicated by a change in the minor | 2 | version number. Breaking changes will be indicated by a change in the minor |
3 | (or major) version number, and will generally be avoided. | 3 | (or major) version number, and will generally be avoided. |
4 | 4 | ||
5 | v1.4.0 | ||
6 | ------ | ||
7 | There are some breaking changes in this release, though less than you might think, considering | ||
8 | this goes all the way from version 2.4.3 to 2.8.0. | ||
9 | |||
10 | * BREAKING CHANGE: Changed streaming API behaviour to make the initial connection asynchronous (Thanks to Shura0 for the detailed report) | ||
11 | * Old behaviour: The initial connection could fail, the stream functions would then throw an exception. | ||
12 | * New behaviour: The initial connection function just returns immediately. If there is a connection error, the listeners on_abort handler is called to inform the user and the connection is retried. | ||
13 | * BREAKING CHANGE: search() now calls through to search_v2. The old behaviour is available as search_v1. | ||
14 | * Added support for polls (Added in 2.8.0) | ||
15 | * Added support for preferences API (Added in 2.8.0) | ||
16 | * Added support for the boost visibility parameter (Added in 2.8.0) | ||
17 | * Added support for type, limit, offset, min_id, max_id, account_id on the search API (Added in 2.8.0) | ||
18 | * Added support for scheduled statuses (Added in 2.7.0) | ||
19 | * Added support for account creation via the API (Thanks gargron for clarifying many things here and in other places. Added in 2.7.0) | ||
20 | * Added support for conversation streaming / stream_direct (Added in 2.6.0) | ||
21 | * Added support for conversations (Added in 2.6.0) | ||
22 | * Added support for report forwarding (Added in 2.5.0) | ||
23 | * Added support for multiple OAuth redirect URIs and forcing the user to re-login in OAuth flows. | ||
24 | * Added support for app_verify_credentials endpoint (Added in 2.7.2). | ||
25 | * Added support for min_id based backwards pagination (Added in 2.6.0). The old method is still supported for older installs. | ||
26 | * Added support for account pins / endorsements (Added in 2.5.0). | ||
27 | * Updated documentation for changes to entities. | ||
28 | * Added the ability to access non-authenticated endpoints with no app credentials (Thanks to cerisara for the report and codl). | ||
29 | * Fixed the streaming API not working with gzip encoding (Thanks to bitleks for the report). | ||
30 | * Added more explicitly caught error classes (Thanks to lefherz). | ||
31 | * Improved Pleroma support including content-type and pagination fixes (Thanks to jfmcbrayer for the report and codl). | ||
32 | * Added better session support (Thanks to jrabbit). | ||
33 | * Fixed dependencies (Thanks to jrabbit). | ||
34 | * Fixed variousmime type issues (Thanks to errbufferoverfl and jfmcbrayer). | ||
35 | * Improved the example code (Thanks to MarkEEaton). | ||
36 | * Fixed various small documentation issues (Thanks to allo-). | ||
37 | |||
5 | v1.3.1 | 38 | v1.3.1 |
6 | ------ | 39 | ------ |
7 | * Mastodon v2.4.3 compatibility: | 40 | * Mastodon v2.4.3 compatibility: |
@@ -1,49 +1,45 @@ | |||
1 | Mastodon.py | 1 | Mastodon.py |
2 | =========== | 2 | =========== |
3 | Register your app! This only needs to be done once. Uncomment the code and substitute in your information. | 3 | Python wrapper for the Mastodon ( https://github.com/tootsuite/mastodon/ ) API. |
4 | 4 | Feature complete for public API as of Mastodon version 2.8.0 and easy to get started with: | |
5 | .. code-block:: python | ||
6 | |||
7 | from mastodon import Mastodon | ||
8 | |||
9 | ''' | ||
10 | Mastodon.create_app( | ||
11 | 'pytooterapp', | ||
12 | api_base_url = 'https://mastodon.social', | ||
13 | to_file = 'pytooter_clientcred.secret' | ||
14 | ) | ||
15 | ''' | ||
16 | |||
17 | Then login. This can be done every time, or use persisted. | ||
18 | |||
19 | .. code-block:: python | ||
20 | |||
21 | from mastodon import Mastodon | ||
22 | |||
23 | mastodon = Mastodon( | ||
24 | client_id = 'pytooter_clientcred.secret', | ||
25 | api_base_url = 'https://mastodon.social' | ||
26 | ) | ||
27 | mastodon.log_in( | ||
28 | '[email protected]', | ||
29 | 'incrediblygoodpassword', | ||
30 | to_file = 'pytooter_usercred.secret' | ||
31 | ) | ||
32 | |||
33 | To post, create an actual API instance. | ||
34 | 5 | ||
35 | .. code-block:: python | 6 | .. code-block:: python |
36 | 7 | ||
37 | from mastodon import Mastodon | 8 | #Register your app! This only needs to be done once. Uncomment the code and substitute in your information. |
38 | 9 | ||
39 | mastodon = Mastodon( | 10 | from mastodon import Mastodon |
40 | access_token = 'pytooter_usercred.secret', | 11 | |
41 | api_base_url = 'https://mastodon.social' | 12 | ''' |
42 | ) | 13 | Mastodon.create_app( |
43 | mastodon.toot('Tooting from python using #mastodonpy !') | 14 | 'pytooterapp', |
44 | 15 | api_base_url = 'https://mastodon.social', | |
45 | Python wrapper for the Mastodon ( https://github.com/tootsuite/mastodon/ ) API. | 16 | to_file = 'pytooter_clientcred.secret' |
46 | Feature complete for public API as of Mastodon version 2.4.3 and easy to get started with. | 17 | ) |
18 | ''' | ||
19 | |||
20 | # Then login. This can be done every time, or use persisted. | ||
21 | |||
22 | from mastodon import Mastodon | ||
23 | |||
24 | mastodon = Mastodon( | ||
25 | client_id = 'pytooter_clientcred.secret', | ||
26 | api_base_url = 'https://mastodon.social' | ||
27 | ) | ||
28 | mastodon.log_in( | ||
29 | '[email protected]', | ||
30 | 'incrediblygoodpassword', | ||
31 | to_file = 'pytooter_usercred.secret' | ||
32 | ) | ||
33 | |||
34 | # To post, create an actual API instance. | ||
35 | |||
36 | from mastodon import Mastodon | ||
37 | |||
38 | mastodon = Mastodon( | ||
39 | access_token = 'pytooter_usercred.secret', | ||
40 | api_base_url = 'https://mastodon.social' | ||
41 | ) | ||
42 | mastodon.toot('Tooting from python using #mastodonpy !') | ||
47 | 43 | ||
48 | You can install Mastodon.py via pypi: | 44 | You can install Mastodon.py via pypi: |
49 | 45 | ||
@@ -56,7 +52,7 @@ You can install Mastodon.py via pypi: | |||
56 | pip3 install Mastodon.py | 52 | pip3 install Mastodon.py |
57 | 53 | ||
58 | Full documentation and basic usage examples can be found | 54 | Full documentation and basic usage examples can be found |
59 | at http://mastodonpy.readthedocs.io/en/latest/ . | 55 | at http://mastodonpy.readthedocs.io/en/stable/ . |
60 | 56 | ||
61 | Acknowledgements | 57 | Acknowledgements |
62 | ---------------- | 58 | ---------------- |
diff --git a/docs/conf.py b/docs/conf.py index 9880b41..907d16b 100644 --- a/docs/conf.py +++ b/docs/conf.py | |||
@@ -66,9 +66,9 @@ author = u'Lorenz Diener' | |||
66 | # built documents. | 66 | # built documents. |
67 | # | 67 | # |
68 | # The short X.Y version. | 68 | # The short X.Y version. |
69 | version = u'1.3' | 69 | version = u'1.4' |
70 | # The full version, including alpha/beta/rc tags. | 70 | # The full version, including alpha/beta/rc tags. |
71 | release = u'1.3.1' | 71 | release = u'1.4.0' |
72 | 72 | ||
73 | # The language for content autogenerated by Sphinx. Refer to documentation | 73 | # The language for content autogenerated by Sphinx. Refer to documentation |
74 | # for a list of supported languages. | 74 | # for a list of supported languages. |
diff --git a/docs/index.rst b/docs/index.rst index 6e798d7..9988a5f 100644 --- a/docs/index.rst +++ b/docs/index.rst | |||
@@ -54,7 +54,7 @@ node running Mastodon by setting `api_base_url` when creating the | |||
54 | api object (or creating an app). | 54 | api object (or creating an app). |
55 | 55 | ||
56 | Mastodon.py aims to implement the complete public Mastodon API. As | 56 | Mastodon.py aims to implement the complete public Mastodon API. As |
57 | of this time, it is feature complete for Mastodon version 2.4.3. Pleromas | 57 | of this time, it is feature complete for Mastodon version 2.8.0. Pleromas |
58 | Mastodon API layer, while not an official target, should also be basically | 58 | Mastodon API layer, while not an official target, should also be basically |
59 | compatible. | 59 | compatible. |
60 | 60 | ||
@@ -372,8 +372,8 @@ Poll dicts | |||
372 | 'multiple': # Boolean indicating whether it is allowed to vote for more than one option | 372 | 'multiple': # Boolean indicating whether it is allowed to vote for more than one option |
373 | 'votes_count': # Total number of votes cast in this poll | 373 | 'votes_count': # Total number of votes cast in this poll |
374 | 'voted': # Boolean indicating whether the logged-in user has already voted in this poll | 374 | 'voted': # Boolean indicating whether the logged-in user has already voted in this poll |
375 | 'options': # The poll options as a list of dicts, each option with a `title` and a | 375 | 'options': # The poll options as a list of dicts, each option with a title and a |
376 | # `votes_count` field. `votes_count` can be None if the poll creator has | 376 | # votes_count field. votes_count can be None if the poll creator has |
377 | # chosen to hide vote totals until the poll expires and it hasn't yet. | 377 | # chosen to hide vote totals until the poll expires and it hasn't yet. |
378 | 'emojis': # List of emoji dicts for all emoji used in answer strings | 378 | 'emojis': # List of emoji dicts for all emoji used in answer strings |
379 | } | 379 | } |
@@ -6,11 +6,11 @@ extras = { | |||
6 | } | 6 | } |
7 | 7 | ||
8 | setup(name='Mastodon.py', | 8 | setup(name='Mastodon.py', |
9 | version='1.3.1', | 9 | version='1.4.0', |
10 | description='Python wrapper for the Mastodon API', | 10 | description='Python wrapper for the Mastodon API', |
11 | packages=['mastodon'], | 11 | packages=['mastodon'], |
12 | install_requires=[ | 12 | install_requires=[ |
13 | 'requests', | 13 | 'requests>=2.4.2', |
14 | 'python-dateutil', | 14 | 'python-dateutil', |
15 | 'six', | 15 | 'six', |
16 | 'pytz', | 16 | 'pytz', |