Skip to content

Commit

Permalink
Add asynchronous.AsyncClient
Browse files Browse the repository at this point in the history
Add async_lru as requirement for async extra
  • Loading branch information
Harmon758 committed May 10, 2022
1 parent 685db25 commit 0aadd53
Show file tree
Hide file tree
Showing 47 changed files with 9,043 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev,test]
pip install .[async,dev,test]
- name: Run tests
run: |
coverage run -m unittest discover tests
Expand Down
185 changes: 185 additions & 0 deletions cassettes/test_asyncclient_block_and_get_blocked_and unblock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
interactions:
- request:
body:
target_user_id: '17874544'
headers:
Content-Type:
- application/json
User-Agent:
- Python/3.10.0 aiohttp/3.7.4.post0 Tweepy/4.9.0
method: POST
uri: https://api.twitter.com/2/users/1072250532645998596/blocking
response:
body:
string: '{"data":{"blocking":true}}'
headers:
api-version:
- '2.42'
cache-control:
- no-cache, no-store, max-age=0
content-disposition:
- attachment; filename=json.json
content-encoding:
- gzip
content-length:
- '52'
content-type:
- application/json; charset=utf-8
date:
- Sat, 07 May 2022 13:20:50 UTC
server:
- tsa_b
set-cookie:
- guest_id_marketing=v1%3A165192965087916447; Max-Age=63072000; Expires=Mon,
06 May 2024 13:20:50 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None
- guest_id_ads=v1%3A165192965087916447; Max-Age=63072000; Expires=Mon, 06 May
2024 13:20:50 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None
- personalization_id="v1_d6raK5hbnCFRKnII2kd5hQ=="; Max-Age=63072000; Expires=Mon,
06 May 2024 13:20:50 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None
- guest_id=v1%3A165192965087916447; Max-Age=63072000; Expires=Mon, 06 May 2024
13:20:50 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None
strict-transport-security:
- max-age=631138519
x-access-level:
- read-write-directmessages
x-connection-hash:
- c9ce8c94ed937e66ed27655cc9cb540351079e5c38b952f0fe5622664320d42e
x-content-type-options:
- nosniff
x-frame-options:
- SAMEORIGIN
x-rate-limit-limit:
- '50'
x-rate-limit-remaining:
- '49'
x-rate-limit-reset:
- '1651930550'
x-response-time:
- '41'
x-xss-protection:
- '0'
status:
code: 200
message: OK
url: https://api.twitter.com/2/users/1072250532645998596/blocking
- request:
body: null
headers:
User-Agent:
- Python/3.10.0 aiohttp/3.7.4.post0 Tweepy/4.9.0
method: GET
uri: https://api.twitter.com/2/users/1072250532645998596/blocking
response:
body:
string: '{"data":[{"id":"17874544","name":"Twitter Support","username":"TwitterSupport"}],"meta":{"result_count":1}}'
headers:
api-version:
- '2.42'
cache-control:
- no-cache, no-store, max-age=0
content-disposition:
- attachment; filename=json.json
content-encoding:
- gzip
content-length:
- '111'
content-type:
- application/json; charset=utf-8
date:
- Sat, 07 May 2022 13:20:51 UTC
server:
- tsa_b
set-cookie:
- guest_id_marketing=v1%3A165192965103954945; Max-Age=63072000; Expires=Mon,
06 May 2024 13:20:51 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None
- guest_id_ads=v1%3A165192965103954945; Max-Age=63072000; Expires=Mon, 06 May
2024 13:20:51 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None
- personalization_id="v1_i17sy7cUDAjsGIpFEiP82w=="; Max-Age=63072000; Expires=Mon,
06 May 2024 13:20:51 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None
- guest_id=v1%3A165192965103954945; Max-Age=63072000; Expires=Mon, 06 May 2024
13:20:51 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None
strict-transport-security:
- max-age=631138519
x-access-level:
- read-write-directmessages
x-connection-hash:
- 6518b1ea1eedc55716aea9d3c3a7c13005142dd0edca34f50821728bda86965a
x-content-type-options:
- nosniff
x-frame-options:
- SAMEORIGIN
x-rate-limit-limit:
- '15'
x-rate-limit-remaining:
- '14'
x-rate-limit-reset:
- '1651930551'
x-response-time:
- '42'
x-xss-protection:
- '0'
status:
code: 200
message: OK
url: https://api.twitter.com/2/users/1072250532645998596/blocking
- request:
body: null
headers:
User-Agent:
- Python/3.10.0 aiohttp/3.7.4.post0 Tweepy/4.9.0
method: DELETE
uri: https://api.twitter.com/2/users/1072250532645998596/blocking/17874544
response:
body:
string: '{"data":{"blocking":false}}'
headers:
api-version:
- '2.42'
cache-control:
- no-cache, no-store, max-age=0
content-disposition:
- attachment; filename=json.json
content-encoding:
- gzip
content-length:
- '53'
content-type:
- application/json; charset=utf-8
date:
- Sat, 07 May 2022 13:20:51 UTC
server:
- tsa_b
set-cookie:
- guest_id_marketing=v1%3A165192965123045517; Max-Age=63072000; Expires=Mon,
06 May 2024 13:20:51 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None
- guest_id_ads=v1%3A165192965123045517; Max-Age=63072000; Expires=Mon, 06 May
2024 13:20:51 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None
- personalization_id="v1_VeY7KCW087dRYotZqyA/ig=="; Max-Age=63072000; Expires=Mon,
06 May 2024 13:20:51 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None
- guest_id=v1%3A165192965123045517; Max-Age=63072000; Expires=Mon, 06 May 2024
13:20:51 GMT; Path=/; Domain=.twitter.com; Secure; SameSite=None
strict-transport-security:
- max-age=631138519
x-access-level:
- read-write-directmessages
x-connection-hash:
- 4e0af34f12925ee64848c60af7be02d98e38b2ee16eb71e16465cab2c32def2a
x-content-type-options:
- nosniff
x-frame-options:
- SAMEORIGIN
x-rate-limit-limit:
- '50'
x-rate-limit-remaining:
- '49'
x-rate-limit-reset:
- '1651930551'
x-response-time:
- '38'
x-xss-protection:
- '0'
status:
code: 200
message: OK
url: https://api.twitter.com/2/users/1072250532645998596/blocking/17874544
version: 1
Loading

0 comments on commit 0aadd53

Please sign in to comment.