tweepy.git
10 months agoadd tweet pin/unpin functions master
Ian Kelling [Tue, 21 Nov 2023 19:27:00 +0000 (14:27 -0500)]
add tweet pin/unpin functions

13 months agoAdd notes about endpoint removals in Client / AsyncClient documentation
Harmon [Sat, 26 Aug 2023 17:45:15 +0000 (12:45 -0500)]
Add notes about endpoint removals in Client / AsyncClient documentation

https://developer.twitter.com/en/updates/changelog

13 months agoDeprecate API methods using now deprecated v1.1 endpoints
Harmon [Sat, 26 Aug 2023 17:11:00 +0000 (12:11 -0500)]
Deprecate API methods using now deprecated v1.1 endpoints

https://twittercommunity.com/t/x-api-v2-migration/203391

13 months agoImprove formatting for link targets in API documentation
Harmon [Sat, 26 Aug 2023 17:01:03 +0000 (12:01 -0500)]
Improve formatting for link targets in API documentation

13 months agoUse method instead of function roles in API documentation
Harmon [Sat, 26 Aug 2023 16:54:12 +0000 (11:54 -0500)]
Use method instead of function roles in API documentation

14 months agoUpdate actions/checkout from v2 to v3
Harmon [Thu, 3 Aug 2023 03:14:28 +0000 (22:14 -0500)]
Update actions/checkout from v2 to v3

15 months agoImprove clarity of OAuth 2.0 User Context example code
Harmon [Wed, 5 Jul 2023 21:27:15 +0000 (16:27 -0500)]
Improve clarity of OAuth 2.0 User Context example code

15 months agoRemove Client and AsyncClient block and unblock methods
Harmon [Thu, 29 Jun 2023 21:45:03 +0000 (16:45 -0500)]
Remove Client and AsyncClient block and unblock methods

The endpoints that they use have been removed.
https://developer.twitter.com/en/updates/changelog

15 months agoAdd GitHub discussions category form for questions
Harmon [Sat, 24 Jun 2023 17:37:58 +0000 (12:37 -0500)]
Add GitHub discussions category form for questions

15 months agoLimit urllib3 to < 2 for test extra
Harmon [Fri, 23 Jun 2023 22:05:35 +0000 (17:05 -0500)]
Limit urllib3 to < 2 for test extra

This is necessary for tests to pass, until there is a new vcrpy release, with https://github.com/kevin1024/vcrpy/pull/723, to fix https://github.com/kevin1024/vcrpy/issues/719.

15 months agoAdd GitHub issue forms and template chooser
Harmon [Fri, 23 Jun 2023 21:27:25 +0000 (16:27 -0500)]
Add GitHub issue forms and template chooser

17 months agoAdd DOI for v4.14.0 to CITATION
Harmon [Mon, 24 Apr 2023 22:41:11 +0000 (17:41 -0500)]
Add DOI for v4.14.0 to CITATION

17 months agoRelease v4.14.0
Harmon [Mon, 24 Apr 2023 22:11:27 +0000 (17:11 -0500)]
Release v4.14.0

17 months agoAdd changelog for version 4.14.0
Harmon [Mon, 24 Apr 2023 22:07:07 +0000 (17:07 -0500)]
Add changelog for version 4.14.0

17 months agoRemove extraneous newline in version 4.13.0 changelog
Harmon [Mon, 24 Apr 2023 22:05:33 +0000 (17:05 -0500)]
Remove extraneous newline in version 4.13.0 changelog

17 months agoRemove no longer valid Twitter API version badges in README
Harmon [Fri, 21 Apr 2023 05:43:01 +0000 (00:43 -0500)]
Remove no longer valid Twitter API version badges in README

17 months agoRemove support for deprecated Premium v1.1 Search APIs
Harmon [Fri, 21 Apr 2023 05:08:33 +0000 (00:08 -0500)]
Remove support for deprecated Premium v1.1 Search APIs

https://twittercommunity.com/t/deprecating-the-premium-v1-1-api/191092

19 months agoRemove redundant section in Expansions and Fields documentation
Harmon [Sat, 18 Mar 2023 11:38:03 +0000 (06:38 -0500)]
Remove redundant section in Expansions and Fields documentation

19 months agoImprove headings in Expansions and Fields documentation
Harmon [Sat, 18 Mar 2023 11:37:10 +0000 (06:37 -0500)]
Improve headings in Expansions and Fields documentation

19 months agoAdd constants for potential model object fields
Harmon [Sat, 18 Mar 2023 11:26:29 +0000 (06:26 -0500)]
Add constants for potential model object fields

19 months agoAdd creator_id field for Space
Harmon [Sat, 18 Mar 2023 11:20:32 +0000 (06:20 -0500)]
Add creator_id field for Space

This field has been missing documentation on https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/space

19 months agoReorganize Streaming documentation
Harmon [Fri, 17 Mar 2023 14:09:18 +0000 (09:09 -0500)]
Reorganize Streaming documentation

19 months agoOverhaul Getting Started documentation
Harmon [Fri, 17 Mar 2023 13:58:39 +0000 (08:58 -0500)]
Overhaul Getting Started documentation

19 months agoUpdate heading in Extended Tweets documentation
Harmon [Fri, 17 Mar 2023 13:41:42 +0000 (08:41 -0500)]
Update heading in Extended Tweets documentation

19 months agoNormalize position of Extended Tweets page in documentation
Harmon [Fri, 17 Mar 2023 11:56:51 +0000 (06:56 -0500)]
Normalize position of Extended Tweets page in documentation

19 months agoAdd note about deprecation and removal of Stream and AsyncStream
Harmon [Fri, 17 Mar 2023 11:48:44 +0000 (06:48 -0500)]
Add note about deprecation and removal of Stream and AsyncStream

19 months agoRemove Stream and AsyncStream
Harmon [Fri, 17 Mar 2023 11:29:51 +0000 (06:29 -0500)]
Remove Stream and AsyncStream

https://twittercommunity.com/t/announcing-the-deprecation-of-v1-1-statuses-filter-endpoint/182960

19 months agoAdd DOI for v4.13.0 to CITATION
Harmon [Thu, 9 Mar 2023 17:46:59 +0000 (11:46 -0600)]
Add DOI for v4.13.0 to CITATION

19 months agoRelease v4.13.0
Harmon [Thu, 9 Mar 2023 17:16:13 +0000 (11:16 -0600)]
Release v4.13.0

19 months agoAdd changelog for version 4.13.0
Harmon [Thu, 9 Mar 2023 17:11:37 +0000 (11:11 -0600)]
Add changelog for version 4.13.0

19 months agoSupport async-lru v2
Harmon [Thu, 9 Mar 2023 16:13:28 +0000 (10:13 -0600)]
Support async-lru v2

19 months agoDeprecate Stream and AsyncStream
Harmon [Wed, 1 Mar 2023 06:52:45 +0000 (00:52 -0600)]
Deprecate Stream and AsyncStream

https://twittercommunity.com/t/announcing-the-deprecation-of-v1-1-statuses-filter-endpoint/182960

19 months agoAdd verified_type field for User
Harmon [Wed, 1 Mar 2023 01:13:05 +0000 (19:13 -0600)]
Add verified_type field for User

20 months agoAdd note in documentation about removal of Tweet source field
Harmon [Sun, 12 Feb 2023 23:00:29 +0000 (17:00 -0600)]
Add note in documentation about removal of Tweet source field

20 months agoHandle incorrect processing state for errored chunked uploads
Harmon [Sat, 11 Feb 2023 00:10:20 +0000 (18:10 -0600)]
Handle incorrect processing state for errored chunked uploads

20 months agoHandle empty payloads in JSONParser.parse
Harmon [Mon, 30 Jan 2023 18:49:11 +0000 (12:49 -0600)]
Handle empty payloads in JSONParser.parse

Resolves #2051

21 months agoRemove streaming methods using retired API v1.1 features
Harmon [Sun, 1 Jan 2023 17:17:24 +0000 (11:17 -0600)]
Remove streaming methods using retired API v1.1 features

https://twittercommunity.com/t/deprecation-announcement-removing-compliance-messages-from-statuses-filter-and-retiring-statuses-sample-from-the-twitter-api-v1-1/170500

21 months agoReturn base class method value in _process_data method for streaming
Harmon [Sun, 1 Jan 2023 16:44:20 +0000 (10:44 -0600)]
Return base class method value in _process_data method for streaming

21 months agoUpdate copyright years to include 2023
Harmon [Sun, 1 Jan 2023 16:33:14 +0000 (10:33 -0600)]
Update copyright years to include 2023

23 months agoAdd section in documentation about dm_event_fields parameter
Harmon [Tue, 15 Nov 2022 04:18:39 +0000 (22:18 -0600)]
Add section in documentation about dm_event_fields parameter

23 months agoUpdate documentation for dm_event_fields parameter
Harmon [Tue, 15 Nov 2022 04:12:27 +0000 (22:12 -0600)]
Update documentation for dm_event_fields parameter

This documentation was previously inaccurate when the Twitter API v2 Direct Messages endpoints were launched but has now recently been updated.

23 months agoDocument specific expansions available for each type of payload
Harmon [Tue, 15 Nov 2022 04:02:48 +0000 (22:02 -0600)]
Document specific expansions available for each type of payload

23 months agoAdd documentation for Direct Message events
Harmon [Tue, 15 Nov 2022 02:43:37 +0000 (20:43 -0600)]
Add documentation for Direct Message events

This documentation was previously missing from the Twitter API documentation when the Twitter API v2 Direct Messages endpoints were launched but has now recently been added.

23 months agoMerge pull request #2009 from qin-yu/qy/dm-event-doc
Harmon [Tue, 15 Nov 2022 02:10:57 +0000 (20:10 -0600)]
Merge pull request #2009 from qin-yu/qy/dm-event-doc

Add fields documentation for Direct Message events

23 months agoRemove DM event section in docs/expansions_and_fields.rst
Qin Yu [Fri, 11 Nov 2022 23:18:05 +0000 (00:18 +0100)]
Remove DM event section in docs/expansions_and_fields.rst

The documentation for dm_event.fields is different and there are no endpoints with that parameter that return other types of objects, so this section is unnecessary.

@Harmon758 have plans to improve this documentation as a whole to include documentation from https://developer.twitter.com/en/docs/twitter-api/expansions, so for now, for consistency, this section shouldn't be here.

But if we want some completeness in this doc page before the next big doc improvement (and also for the consistency in Client methods' docstrings), we can put the following code back later just in case people thought the doc is not up-to-date:

```rst
.. _dm_event_fields_parameter:

``dm_event_fields``
---------------

Extra fields to include in the event payload. `id`, `text` and `event_type` are
returned by default.

.. _Direct Message event fields: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/dm-events
```

Co-Authored-By: Harmon <Harmon.Public@gmail.com>
23 months agoUpdate Direct Message events' expansions in docs/expansions_and_fields.rst
Qin Yu [Fri, 11 Nov 2022 22:02:48 +0000 (23:02 +0100)]
Update Direct Message events' expansions in docs/expansions_and_fields.rst

For consistency, this section should also be taken from the description for the expansions parameter for endpoints that return the object type, e.g. https://developer.twitter.com/en/docs/twitter-api/direct-messages/lookup/api-reference/get-dm_conversations-with-participant_id-dm_events for DM events.

Future work: improve this section of the documentation in the future to include information like this from https://developer.twitter.com/en/docs/twitter-api/expansions

Co-authored-by: Harmon <Harmon758@gmail.com>
23 months agoUpdate expansions section in docs/expansions_and_fields.rst
Qin Yu [Fri, 11 Nov 2022 21:55:49 +0000 (22:55 +0100)]
Update expansions section in docs/expansions_and_fields.rst

The term "___ object" is used in a natural language context, and Twitter's official documents do use lower cases for "user" and "event". Also, indeed, query parameters' descriptions in all three Direct Messages lookup API references ([1](https://developer.twitter.com/en/docs/twitter-api/direct-messages/lookup/api-reference/get-dm_events) [2](https://developer.twitter.com/en/docs/twitter-api/direct-messages/lookup/api-reference/get-dm_conversations-with-participant_id-dm_events) [3](https://developer.twitter.com/en/docs/twitter-api/direct-messages/lookup/api-reference/get-dm_conversations-dm_conversation_id-dm_events)) use the term "Direct Message conversation event", though in the informal abstract/intro sections they use "Direct Messages (DM) events", "Direct Messages" and "Messages" interchangeably.

Co-authored-by: Harmon <Harmon758@gmail.com>
23 months agoAdd fields documentation for Direct Message events
Qin Yu [Fri, 11 Nov 2022 13:09:27 +0000 (14:09 +0100)]
Add fields documentation for Direct Message events

23 months agoMove SECURITY.md to .github folder
Harmon [Thu, 10 Nov 2022 08:14:34 +0000 (02:14 -0600)]
Move SECURITY.md to .github folder

23 months agoCreate SECURITY.md
Harmon [Thu, 10 Nov 2022 08:09:43 +0000 (02:09 -0600)]
Create SECURITY.md

23 months agoAdd DOI for v4.12.1 to CITATION
Harmon [Sun, 6 Nov 2022 21:09:31 +0000 (15:09 -0600)]
Add DOI for v4.12.1 to CITATION

23 months agoRelease v4.12.1
Harmon [Sun, 6 Nov 2022 20:22:58 +0000 (14:22 -0600)]
Release v4.12.1

23 months agoAdd changelog for version 4.12.1
Harmon [Sun, 6 Nov 2022 20:17:04 +0000 (14:17 -0600)]
Add changelog for version 4.12.1

23 months agoChange initial network_error_wait to 0 for streaming
Harmon [Wed, 2 Nov 2022 01:37:56 +0000 (20:37 -0500)]
Change initial network_error_wait to 0 for streaming

Attempt to reconnect immediately when established streaming connection drops

23 months agoDocument limit and pagination_token parameters for AsyncPaginator
Harmon [Sun, 30 Oct 2022 03:26:13 +0000 (22:26 -0500)]
Document limit and pagination_token parameters for AsyncPaginator

23 months agoDocument limit and pagination_token parameters for Paginator
Harmon [Sun, 30 Oct 2022 03:24:13 +0000 (22:24 -0500)]
Document limit and pagination_token parameters for Paginator

23 months agoFix Intersphinx link to namedtuple in documentation for Response
Harmon [Sun, 30 Oct 2022 03:12:20 +0000 (22:12 -0500)]
Fix Intersphinx link to namedtuple in documentation for Response

23 months agoWarn when Tweet data is missing default edit_history_tweet_ids field
Harmon [Sun, 30 Oct 2022 02:28:24 +0000 (21:28 -0500)]
Warn when Tweet data is missing default edit_history_tweet_ids field

23 months agoAdd CITATION.cff
Harmon [Sat, 29 Oct 2022 06:48:03 +0000 (01:48 -0500)]
Add CITATION.cff

23 months agoImprove format of badges in README
Harmon [Sat, 29 Oct 2022 06:01:59 +0000 (01:01 -0500)]
Improve format of badges in README

23 months agoAdd DOI badge to README
Harmon [Sat, 29 Oct 2022 05:56:23 +0000 (00:56 -0500)]
Add DOI badge to README

23 months agoLog streaming connection error exceptions
Harmon [Sat, 29 Oct 2022 05:30:27 +0000 (00:30 -0500)]
Log streaming connection error exceptions

23 months agoDefault AsyncBaseStream to abort closed SSL transports
Harmon [Sat, 29 Oct 2022 03:14:50 +0000 (22:14 -0500)]
Default AsyncBaseStream to abort closed SSL transports

Resolves #1904

23 months agoAdd 1 second buffer to API v2 streaming timeout
Harmon [Sat, 29 Oct 2022 01:39:11 +0000 (20:39 -0500)]
Add 1 second buffer to API v2 streaming timeout

The keep-alive is often received after marginally longer than 20 seconds, causing unnecessary timeouts and reconnects with a timeout of exactly 20 seconds

23 months agoReplace docs/requirements.txt with docs extra
Harmon [Fri, 28 Oct 2022 07:23:58 +0000 (02:23 -0500)]
Replace docs/requirements.txt with docs extra

23 months agoUse _construct_response in AsyncClient._make_request
Harmon [Fri, 28 Oct 2022 06:20:20 +0000 (01:20 -0500)]
Use _construct_response in AsyncClient._make_request

23 months agoMerge pull request #1997 from JEnduriumK/master
Harmon [Fri, 28 Oct 2022 06:11:07 +0000 (01:11 -0500)]
Merge pull request #1997 from JEnduriumK/master

Breakout Response creation into separate method

23 months agoBreakout Response creation into separate method
J.Endurium [Fri, 28 Oct 2022 05:18:55 +0000 (00:18 -0500)]
Breakout Response creation into separate method

23 months agoRelease v4.12.0
Harmon [Fri, 28 Oct 2022 03:25:45 +0000 (22:25 -0500)]
Release v4.12.0

23 months agoAdd changelog for version 4.12.0
Harmon [Fri, 28 Oct 2022 03:16:23 +0000 (22:16 -0500)]
Add changelog for version 4.12.0

23 months agoAdd support for Twitter API v2 Direct Messages endpoints
Harmon [Fri, 28 Oct 2022 02:54:28 +0000 (21:54 -0500)]
Add support for Twitter API v2 Direct Messages endpoints

Resolves #1995

23 months agoAdd missing angle bracket to string representation of ReferencedTweet
Harmon [Fri, 28 Oct 2022 01:34:05 +0000 (20:34 -0500)]
Add missing angle bracket to string representation of ReferencedTweet

23 months agoFix signature of Client.get_quote_tweets in documentation
Harmon [Thu, 27 Oct 2022 23:35:28 +0000 (18:35 -0500)]
Fix signature of Client.get_quote_tweets in documentation

23 months agoRevert "Change API method docstrings to raw strings"
Harmon [Tue, 25 Oct 2022 23:26:51 +0000 (18:26 -0500)]
Revert "Change API method docstrings to raw strings"

This reverts commit fb851a0192cb97d321611eb33427b872ff5ccbb9.

This broke multi-line signature overrides and will likely be resolved with type hints anyway.

23 months agoImprove exceptions raised for unknown method return types for pagination
Harmon [Thu, 27 Oct 2022 17:56:10 +0000 (12:56 -0500)]
Improve exceptions raised for unknown method return types for pagination

23 months agoHandle different method return types in flatten methods for pagination
Harmon [Thu, 27 Oct 2022 17:33:49 +0000 (12:33 -0500)]
Handle different method return types in flatten methods for pagination

23 months agoAdd version changed directive to documentation for Media
Harmon [Thu, 27 Oct 2022 17:13:24 +0000 (12:13 -0500)]
Add version changed directive to documentation for Media

23 months agoMerge pull request #1910 from New-dev0/patch-1
Harmon [Thu, 27 Oct 2022 17:07:28 +0000 (12:07 -0500)]
Merge pull request #1910 from New-dev0/patch-1

Add missing "variants" to Media Object

23 months agoUpdate tweepy/media.py
Devesh Pal [Thu, 27 Oct 2022 12:06:02 +0000 (17:36 +0530)]
Update tweepy/media.py

Co-authored-by: Harmon <Harmon758@gmail.com>
23 months agoAdd documentation for Tweet fields
Harmon [Wed, 26 Oct 2022 21:12:12 +0000 (16:12 -0500)]
Add documentation for Tweet fields

edit_history_tweet_ids and edit_controls

23 months agoFix class references in notes in documentation for AsyncClient methods
Harmon [Wed, 26 Oct 2022 07:41:28 +0000 (02:41 -0500)]
Fix class references in notes in documentation for AsyncClient methods

23 months agoUpdate actions/setup-python from v3 to v4
Harmon [Wed, 26 Oct 2022 00:18:50 +0000 (19:18 -0500)]
Update actions/setup-python from v3 to v4

23 months agoUpdate actions/setup-python from v2 to v3
Harmon [Wed, 26 Oct 2022 00:12:12 +0000 (19:12 -0500)]
Update actions/setup-python from v2 to v3

23 months agoAdd support for Python 3.11
Harmon [Wed, 26 Oct 2022 00:02:58 +0000 (19:02 -0500)]
Add support for Python 3.11

23 months agoChange API method docstrings to raw strings
Harmon [Tue, 25 Oct 2022 23:26:51 +0000 (18:26 -0500)]
Change API method docstrings to raw strings

Prevent DeprecationWarnings about invalid escape sequences

23 months agoImprove formatting in api.py
Harmon [Tue, 25 Oct 2022 23:12:48 +0000 (18:12 -0500)]
Improve formatting in api.py

23 months agoMerge pull request #1861 from lqhuang/fix-meta-attr-for-paginator
Harmon [Tue, 25 Oct 2022 18:44:16 +0000 (13:44 -0500)]
Merge pull request #1861 from lqhuang/fix-meta-attr-for-paginator

Fix `AttributeError` by accessing `meta` field when `return_type` is dict

23 months agoAdjust line length for `AsyncPaginator` docstring
Lanqing Huang [Tue, 25 Oct 2022 10:00:06 +0000 (18:00 +0800)]
Adjust line length for `AsyncPaginator` docstring

23 months agoAdjust docstring for sync/async Paginator
Lanqing Huang [Tue, 25 Oct 2022 02:29:39 +0000 (10:29 +0800)]
Adjust docstring for sync/async Paginator

23 months agoRelease v4.11.0
Harmon [Mon, 24 Oct 2022 22:27:18 +0000 (17:27 -0500)]
Release v4.11.0

23 months agoAdd changelog for version 4.11.0
Harmon [Mon, 24 Oct 2022 22:12:00 +0000 (17:12 -0500)]
Add changelog for version 4.11.0

23 months agoAdd version changed directive to documentation for Tweet
Harmon [Mon, 24 Oct 2022 21:35:07 +0000 (16:35 -0500)]
Add version changed directive to documentation for Tweet

23 months agoAdd version changed directive to documentation for API
Harmon [Mon, 24 Oct 2022 21:34:39 +0000 (16:34 -0500)]
Add version changed directive to documentation for API

23 months agoFix incorrect `Response` type for `AsyncPaginator` and revert formatting from `black`
Lanqing Huang [Mon, 24 Oct 2022 07:54:11 +0000 (15:54 +0800)]
Fix incorrect `Response` type for `AsyncPaginator` and revert formatting from `black`

23 months agoFix handling of `meta` attr for different response types
Lanqing Huang [Sun, 23 Oct 2022 13:16:49 +0000 (21:16 +0800)]
Fix handling of `meta` attr for different response types

23 months agoFix `AttributeError` by accessing `meta` field when return_type is dict
Lanqing Huang [Wed, 13 Apr 2022 08:06:01 +0000 (16:06 +0800)]
Fix `AttributeError` by accessing `meta` field when return_type is dict

23 months agoUpdate changelog references in FAQ
Harmon [Sat, 22 Oct 2022 01:05:45 +0000 (20:05 -0500)]
Update changelog references in FAQ

23 months agoImprove documentation for wait_on_rate_limit parameter for streaming
Harmon [Sat, 22 Oct 2022 00:55:53 +0000 (19:55 -0500)]
Improve documentation for wait_on_rate_limit parameter for streaming

Resolves part of #1986

23 months agoLower API v2 streaming timeout to 20 seconds
Harmon [Sat, 22 Oct 2022 00:33:50 +0000 (19:33 -0500)]
Lower API v2 streaming timeout to 20 seconds

Resolves part of #1986

23 months agoHandle 429 HTTP errors for streaming
Harmon [Fri, 21 Oct 2022 23:59:51 +0000 (18:59 -0500)]
Handle 429 HTTP errors for streaming

Resolves #1982
Resolves #1986