Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit da7905e

Browse files
committed
Merge pull request #339 from bear/docs/v3.1_release
v3.1 Release Documentation
2 parents 94f4dd1 + 6206f5e commit da7905e

File tree

8 files changed

+63
-58
lines changed

8 files changed

+63
-58
lines changed

doc/changelog.rst

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Changelog
2+
---------
3+
4+
Version 3.1
5+
==========
6+
7+
What's New
8+
____________
9+
10+
* :py:func:`twitter.api.Api.PostMediaMetadata()` Method allows the posting of alt text (hover text) to a photo on Twitter. Note that it appears that you have to call this method prior to attaching the photo to a status.
11+
12+
* A couple new methods have been added related to showing the connections between two users:
13+
14+
* :py:func:`twitter.api.Api.ShowFriendship()` shows the connection between two users (i.e., are they following each other?)
15+
* :py:func:`twitter.api.Api.IncomingFriendship()` shows all of the authenticated user's pending follower requests (if the user has set their account to private).
16+
* :py:func:`twitter.api.Api.OutgoingFriendship()` shows the authenticated user's request to follow other users (i.e. the user has attempted to follow a private account).
17+
18+
* Several methods were added related to muting users:
19+
20+
* :py:func:`twitter.api.Api.GetMutes()` returns **all** users the currently authenticated user is muting (as ``twitter.models.User`` objects).
21+
* :py:func:`twitter.api.Api.GetMutesPaged()` returns a page of ``twitter.models.User`` objects.
22+
* :py:func:`twitter.api.Api.GetMutesIDs()` returns **all** of the users the currently authenticated user is muting as integers.
23+
* :py:func:`twitter.api.Api.GetMutesIDsPaged()` returns a single page of the users the currently authenticated user is muting as integers.
24+
25+
26+
What's Changed
27+
______________
28+
29+
* :py:func:`twitter.api.Api.GetStatus()` Now accepts the keyword argument ``include_ext_alt_text`` which will request alt text to be included with the Status object being returned (if available). Defaults to ``True``.
30+
31+
* ``[model].__repr__()`` functions have been revised for better Unicode compatibility. If you notice any weirdness, please let us know.
32+
33+
* :py:func:`twitter.api.Api()` no longer accepts the ``shortner`` parameter; however, see ``examples/shorten_url.py`` for an example of how to use a URL shortener with the API.
34+
35+
* :py:func:`twitter.api.Api._Encode()` and :py:func:`twitter.api.Api._EncodePostData()` have both been refactored out of the API.
36+
37+
* :py:class:`twitter.models.Media` now has an attribute ``ext_alt_text`` for alt (hover) text for images posted to Twitter.
38+
39+
* :py:class:`twitter.models.Status` no longer has the properties ``relative_created_at``, ``now``, or ``Now``. If you require a relative time, we suggest using a third-party library.
40+
41+
* Updated examples, specifically ``examples/twitter-to-xhtml.py``, ``examples/view_friends.py``, ``examples/shorten_url.py``
42+
43+
* Updated ``get_access_token.py`` script to be python3 compatible.

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
# built documents.
5858
#
5959
# The short X.Y version.
60-
version = '3.0rc1'
60+
version = '3.1'
6161
# The full version, including alpha/beta/rc tags.
62-
release = '3.0rc1'
62+
release = '3.1'
6363

6464
# The language for content autogenerated by Sphinx. Refer to documentation
6565
# for a list of supported languages.

doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Contents:
1616
getting_started.rst
1717
contributing.rst
1818
migration_v30.rst
19+
changelog.rst
1920
rate_limits.rst
2021
models.rst
2122
searching.rst

doc/models.rst

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ Models
33

44
Python-twitter provides the following models of the objects returned by the Twitter API:
55

6-
* :py:mod:`twitter.category.Category`
7-
* :py:mod:`twitter.direct_message.DirectMessage`
8-
* :py:mod:`twitter.hashtag.Hashtag`
9-
* :py:mod:`twitter.list.List`
10-
* :py:mod:`twitter.media.Media`
11-
* :py:mod:`twitter.status.Status`
12-
* :py:mod:`twitter.trend.Trend`
13-
* :py:mod:`twitter.url.Url`
14-
* :py:mod:`twitter.user.User`
15-
* :py:mod:`twitter.user.UserStatus`
16-
6+
* :py:class:`twitter.models.Category`
7+
* :py:class:`twitter.models.DirectMessage`
8+
* :py:class:`twitter.models.Hashtag`
9+
* :py:class:`twitter.models.List`
10+
* :py:class:`twitter.models.Media`
11+
* :py:class:`twitter.models.Status`
12+
* :py:class:`twitter.models.Trend`
13+
* :py:class:`twitter.models.Url`
14+
* :py:class:`twitter.models.User`
15+
* :py:class:`twitter.models.UserStatus`

doc/searching.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ Searching
99
Raw Queries
1010
===========
1111

12-
To the Api.GetSearch() method, you can pass the parameter ``raw_query``, which should be the query string you wish to use for the search **omitting the leading "?"**. This will override every other parameter. Twitter's search parameters are quite complex, so if you have a need for a very particular search, you can find Twitter's documentation at https://dev.twitter.com/rest/public/search.
12+
To the ``Api.GetSearch()`` method, you can pass the parameter ``raw_query``, which should be the query string you wish to use for the search **omitting the leading "?"**. This will override every other parameter. Twitter's search parameters are quite complex, so if you have a need for a very particular search, you can find Twitter's documentation at https://dev.twitter.com/rest/public/search.
1313

1414
For example, if you want to search for only tweets containing the word "twitter", then you could do the following: ::
1515

16-
results = api.GetSearch(raw_query="q=twitter%20&result_type=recent&since=2014-07-19&count=100")
16+
results = api.GetSearch(
17+
raw_query="q=twitter%20&result_type=recent&since=2014-07-19&count=100")
1718

18-
If you want to build a search query and you're not quite sure how it should look all put together, you can use Twitter's Advanced Search tool: https://twitter.com/search-advanced, and then use the part of search URL after the "?" to use for the Api, removing the ``&src=typd`` portion.
19+
If you want to build a search query and you're not quite sure how it should look all put together, you can use Twitter's Advanced Search tool: https://twitter.com/search-advanced, and then use the part of search URL after the "?" to use for the Api, removing the ``&src=typd`` portion.

doc/twitter.rst

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,7 @@ API
1313
Models
1414
---------------------
1515

16-
.. automodule:: twitter.category
17-
:members:
18-
:undoc-members:
19-
:show-inheritance:
20-
21-
.. automodule:: twitter.direct_message
22-
:members:
23-
:undoc-members:
24-
:show-inheritance:
25-
26-
.. automodule:: twitter.hashtag
27-
:members:
28-
:undoc-members:
29-
:show-inheritance:
30-
31-
.. automodule:: twitter.list
32-
:members:
33-
:undoc-members:
34-
:show-inheritance:
35-
36-
.. automodule:: twitter.media
16+
.. automodule:: twitter.models
3717
:members:
3818
:undoc-members:
3919
:show-inheritance:
@@ -43,26 +23,6 @@ Models
4323
:undoc-members:
4424
:show-inheritance:
4525

46-
.. automodule:: twitter.status
47-
:members:
48-
:undoc-members:
49-
:show-inheritance:
50-
51-
.. automodule:: twitter.trend
52-
:members:
53-
:undoc-members:
54-
:show-inheritance:
55-
56-
.. automodule:: twitter.url
57-
:members:
58-
:undoc-members:
59-
:show-inheritance:
60-
61-
.. automodule:: twitter.user
62-
:members:
63-
:undoc-members:
64-
:show-inheritance:
65-
6626

6727
Utilities
6828
---------------------

requirements.docs.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ future>=0.15.2
22
requests>=2.9.1
33
requests-oauthlib>=0.6.1
44
sphinx>=1.3.6
5+
sphinx_rtd_theme

twitter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
__email__ = '[email protected]'
2424
__copyright__ = 'Copyright (c) 2007-2016 The Python-Twitter Developers'
2525
__license__ = 'Apache License 2.0'
26-
__version__ = '3.0rc1'
26+
__version__ = '3.1'
2727
__url__ = 'https://github.com/bear/python-twitter'
2828
__download_url__ = 'https://pypi.python.org/pypi/python-twitter'
2929
__description__ = 'A Python wrapper around the Twitter API'

0 commit comments

Comments
 (0)