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 version number. Breaking changes will be indicated by a change in the minor (or major) version number, and will generally be avoided. +v1.4.0 +------ +There are some breaking changes in this release, though less than you might think, considering +this goes all the way from version 2.4.3 to 2.8.0. + +* BREAKING CHANGE: Changed streaming API behaviour to make the initial connection asynchronous (Thanks to Shura0 for the detailed report) + * Old behaviour: The initial connection could fail, the stream functions would then throw an exception. + * 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. +* BREAKING CHANGE: search() now calls through to search_v2. The old behaviour is available as search_v1. +* Added support for polls (Added in 2.8.0) +* Added support for preferences API (Added in 2.8.0) +* Added support for the boost visibility parameter (Added in 2.8.0) +* Added support for type, limit, offset, min_id, max_id, account_id on the search API (Added in 2.8.0) +* Added support for scheduled statuses (Added in 2.7.0) +* Added support for account creation via the API (Thanks gargron for clarifying many things here and in other places. Added in 2.7.0) +* Added support for conversation streaming / stream_direct (Added in 2.6.0) +* Added support for conversations (Added in 2.6.0) +* Added support for report forwarding (Added in 2.5.0) +* Added support for multiple OAuth redirect URIs and forcing the user to re-login in OAuth flows. +* Added support for app_verify_credentials endpoint (Added in 2.7.2). +* Added support for min_id based backwards pagination (Added in 2.6.0). The old method is still supported for older installs. +* Added support for account pins / endorsements (Added in 2.5.0). +* Updated documentation for changes to entities. +* Added the ability to access non-authenticated endpoints with no app credentials (Thanks to cerisara for the report and codl). +* Fixed the streaming API not working with gzip encoding (Thanks to bitleks for the report). +* Added more explicitly caught error classes (Thanks to lefherz). +* Improved Pleroma support including content-type and pagination fixes (Thanks to jfmcbrayer for the report and codl). +* Added better session support (Thanks to jrabbit). +* Fixed dependencies (Thanks to jrabbit). +* Fixed variousmime type issues (Thanks to errbufferoverfl and jfmcbrayer). +* Improved the example code (Thanks to MarkEEaton). +* Fixed various small documentation issues (Thanks to allo-). + v1.3.1 ------ * Mastodon v2.4.3 compatibility: diff --git a/README.rst b/README.rst index 39923b9..a49a5e2 100644 --- a/README.rst +++ b/README.rst @@ -1,49 +1,45 @@ Mastodon.py =========== -Register your app! This only needs to be done once. Uncomment the code and substitute in your information. - -.. code-block:: python - - from mastodon import Mastodon - - ''' - Mastodon.create_app( - 'pytooterapp', - api_base_url = 'https://mastodon.social', - to_file = 'pytooter_clientcred.secret' - ) - ''' - -Then login. This can be done every time, or use persisted. - -.. code-block:: python - - from mastodon import Mastodon - - mastodon = Mastodon( - client_id = 'pytooter_clientcred.secret', - api_base_url = 'https://mastodon.social' - ) - mastodon.log_in( - 'my_login_email@example.com', - 'incrediblygoodpassword', - to_file = 'pytooter_usercred.secret' - ) - -To post, create an actual API instance. - -.. code-block:: python - - from mastodon import Mastodon - - mastodon = Mastodon( - access_token = 'pytooter_usercred.secret', - api_base_url = 'https://mastodon.social' - ) - mastodon.toot('Tooting from python using #mastodonpy !') - Python wrapper for the Mastodon ( https://github.com/tootsuite/mastodon/ ) API. -Feature complete for public API as of Mastodon version 2.4.3 and easy to get started with. +Feature complete for public API as of Mastodon version 2.8.0 and easy to get started with: + +.. code-block:: python + + #Register your app! This only needs to be done once. Uncomment the code and substitute in your information. + + from mastodon import Mastodon + + ''' + Mastodon.create_app( + 'pytooterapp', + api_base_url = 'https://mastodon.social', + to_file = 'pytooter_clientcred.secret' + ) + ''' + + # Then login. This can be done every time, or use persisted. + + from mastodon import Mastodon + + mastodon = Mastodon( + client_id = 'pytooter_clientcred.secret', + api_base_url = 'https://mastodon.social' + ) + mastodon.log_in( + 'my_login_email@example.com', + 'incrediblygoodpassword', + to_file = 'pytooter_usercred.secret' + ) + + # To post, create an actual API instance. + + from mastodon import Mastodon + + mastodon = Mastodon( + access_token = 'pytooter_usercred.secret', + api_base_url = 'https://mastodon.social' + ) + mastodon.toot('Tooting from python using #mastodonpy !') You can install Mastodon.py via pypi: @@ -56,7 +52,7 @@ You can install Mastodon.py via pypi: pip3 install Mastodon.py Full documentation and basic usage examples can be found -at http://mastodonpy.readthedocs.io/en/latest/ . +at http://mastodonpy.readthedocs.io/en/stable/ . Acknowledgements ---------------- 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' # built documents. # # The short X.Y version. -version = u'1.3' +version = u'1.4' # The full version, including alpha/beta/rc tags. -release = u'1.3.1' +release = u'1.4.0' # The language for content autogenerated by Sphinx. Refer to documentation # 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 api object (or creating an app). Mastodon.py aims to implement the complete public Mastodon API. As -of this time, it is feature complete for Mastodon version 2.4.3. Pleromas +of this time, it is feature complete for Mastodon version 2.8.0. Pleromas Mastodon API layer, while not an official target, should also be basically compatible. @@ -372,8 +372,8 @@ Poll dicts 'multiple': # Boolean indicating whether it is allowed to vote for more than one option 'votes_count': # Total number of votes cast in this poll 'voted': # Boolean indicating whether the logged-in user has already voted in this poll - 'options': # The poll options as a list of dicts, each option with a `title` and a - # `votes_count` field. `votes_count` can be None if the poll creator has + 'options': # The poll options as a list of dicts, each option with a title and a + # votes_count field. votes_count can be None if the poll creator has # chosen to hide vote totals until the poll expires and it hasn't yet. 'emojis': # List of emoji dicts for all emoji used in answer strings } diff --git a/setup.py b/setup.py index 72e3c8b..737f6d9 100644 --- a/setup.py +++ b/setup.py @@ -6,11 +6,11 @@ extras = { } setup(name='Mastodon.py', - version='1.3.1', + version='1.4.0', description='Python wrapper for the Mastodon API', packages=['mastodon'], install_requires=[ - 'requests', + 'requests>=2.4.2', 'python-dateutil', 'six', 'pytz',