add new entity tests

pull/397/head
halcy 2025-02-15 22:05:25 +02:00
rodzic 108ae64f9e
commit 3f3533287d
20 zmienionych plików z 9499 dodań i 8593 usunięć

Wyświetl plik

@ -148,6 +148,9 @@ Return types
.. autoclass:: mastodon.return_types.PreviewCard
:members:
.. autoclass:: mastodon.return_types.TrendingLinkHistory
:members:
.. autoclass:: mastodon.return_types.PreviewCardAuthor
:members:
@ -373,6 +376,12 @@ Return types
.. autoclass:: mastodon.return_types.Appeal
:members:
.. autoclass:: mastodon.return_types.NotificationRequest
:members:
.. autoclass:: mastodon.return_types.SupportedLocale
:members:
Deprecated types
================
.. autoclass:: mastodon.return_types.Filter

Wyświetl plik

@ -205,7 +205,7 @@ class Mastodon(Internals):
"""
Retrieve the instance's extended description.
"""
return self.__api_request('GET', '/api/v1/instance/extended_description', parse=False).decode("utf-8")
return self.__api_request('GET', '/api/v1/instance/extended_description')
def instance_translation_languages(self) -> Dict[str, List[str]]:
"""

Wyświetl plik

@ -1729,7 +1729,7 @@ class FilterV2(AttribAccessDict):
.. code-block:: python
# Returns a FilterV2 object
mastodon.filters()[0]
mastodon.filters_v2()[0]
See also (Mastodon API documentation): https://docs.joinmastodon.org/entities/Filter/
"""
@ -5742,7 +5742,7 @@ class FilterKeyword(AttribAccessDict):
.. code-block:: python
# Returns a FilterKeyword object
TODO_TO_BE_IMPLEMENTED
mastodon.filters_v2()[0].keywords[0]
See also (Mastodon API documentation): https://docs.joinmastodon.org/entities/FilterKeyword
"""
@ -5782,7 +5782,7 @@ class FilterStatus(AttribAccessDict):
.. code-block:: python
# Returns a FilterStatus object
TODO_TO_BE_IMPLEMENTED
mastodon.filter_statuses_v2(mastodon.filters_v2()[0])[0]
See also (Mastodon API documentation): https://docs.joinmastodon.org/entities/FilterStatus
"""
@ -5872,7 +5872,7 @@ class StatusSource(AttribAccessDict):
.. code-block:: python
# Returns a StatusSource object
mastodon.status_source()
mastodon.status_source(<status id>)
See also (Mastodon API documentation): https://docs.joinmastodon.org/entities/StatusSource
"""
@ -6124,7 +6124,7 @@ class NotificationPolicy(AttribAccessDict):
.. code-block:: python
# Returns a NotificationPolicy object
mastodon.notification_policy()
mastodon.notifications_policy()
See also (Mastodon API documentation): https://docs.joinmastodon.org/entities/NotificationPolicy
"""
@ -6188,7 +6188,7 @@ class NotificationPolicySummary(AttribAccessDict):
.. code-block:: python
# Returns a NotificationPolicySummary object
mastodon.notification_policy().summary
mastodon.notifications_policy().summary
See also (Mastodon API documentation): https://docs.joinmastodon.org/entities/NotificationPolicy
"""
@ -6293,7 +6293,7 @@ class GroupedNotificationsResults(AttribAccessDict):
.. code-block:: python
# Returns a GroupedNotificationsResults object
TODO_TO_BE_IMPLEMENTED
mastodon.grouped_notifications()
See also (Mastodon API documentation): https://docs.joinmastodon.org/entities/GroupedNotificationsResults
"""
@ -6324,7 +6324,7 @@ class GroupedNotificationsResults(AttribAccessDict):
notification_groups: "NonPaginatableList[NotificationGroup]"
"""
The grouped notifications themselves.
The grouped notifications themselves. Is actually in fact paginatable, but via the parent object.
Version history:
* 4.3.0: added
@ -6357,7 +6357,7 @@ class PartialAccountWithAvatar(AttribAccessDict):
.. code-block:: python
# Returns a PartialAccountWithAvatar object
TODO_TO_BE_IMPLEMENTED
mastodon.grouped_notifications().partial_accounts[0]
See also (Mastodon API documentation): https://docs.joinmastodon.org/entities/GroupedNotificationsResults
"""
@ -6429,7 +6429,7 @@ class NotificationGroup(AttribAccessDict):
.. code-block:: python
# Returns a NotificationGroup object
TODO_TO_BE_IMPLEMENTED
mastodon.grouped_notifications().notification_groups[0]
See also (Mastodon API documentation): https://docs.joinmastodon.org/entities/GroupedNotificationsResults
"""
@ -6735,7 +6735,7 @@ class SupportedLocale(AttribAccessDict):
.. code-block:: python
# Returns a SupportedLocale object
mastodon.languages()
mastodon.instance_languages()[0]
See also (Mastodon API documentation): https://docs.joinmastodon.org/entities/Instance
"""

Wyświetl plik

@ -8828,8 +8828,8 @@
{
"name": "Status source",
"python_name": "StatusSource",
"func_call": "mastodon.status_source()",
"func_call_real": null,
"func_call": "mastodon.status_source(<status id>)",
"func_call_real": "mastodon.status_source(110446223051565765)",
"func_call_additional": null,
"func_alternate_acc": null,
"manual_update": false,
@ -9213,7 +9213,7 @@
{
"name": "Notification Policy",
"python_name": "NotificationPolicy",
"func_call": "mastodon.notification_policy()",
"func_call": "mastodon.notifications_policy()",
"func_call_real": null,
"func_call_additional": null,
"func_alternate_acc": null,
@ -9305,7 +9305,7 @@
{
"name": "Notification Policy Summary",
"python_name": "NotificationPolicySummary",
"func_call": "mastodon.notification_policy().summary",
"func_call": "mastodon.notifications_policy().summary",
"func_call_real": null,
"func_call_additional": null,
"func_alternate_acc": null,
@ -9499,7 +9499,7 @@
"func_call": "mastodon.grouped_notifications().partial_accounts[0]",
"func_call_real": null,
"func_call_additional": null,
"func_alternate_acc": null,
"func_alternate_acc": true,
"manual_update": false,
"masto_doc_link": "https://docs.joinmastodon.org/entities/GroupedNotificationsResults",
"description": "A stripped-down version of Account, containing only what is necessary to display avatars and a few other fields.",
@ -9729,7 +9729,7 @@
"func_call_real": null,
"func_call_additional": null,
"func_alternate_acc": null,
"manual_update": false,
"manual_update": true,
"masto_doc_link": "https://docs.joinmastodon.org/entities/AccountWarning",
"description": "Moderation warning against a particular account.",
"fields": {
@ -9949,7 +9949,7 @@
{
"name": "Supported Locale",
"python_name": "SupportedLocale",
"func_call": "mastodon.languages()",
"func_call": "mastodon.instance_languages()[0]",
"func_call_real": null,
"func_call_additional": null,
"func_alternate_acc": null,

Wyświetl plik

@ -0,0 +1,100 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- DUMMY
Connection:
- keep-alive
User-Agent:
- mastodonpy
method: GET
uri: https://mastodon.social/api/v1/instance/extended_description
response:
body:
string: '{"updated_at": "2023-01-19T14:55:44Z", "content": "<p>Please mind that
the <a href=\"mailto:staff@mastodon.social\">staff@mastodon.social</a> e-mail
is for inquiries related to the operation of the mastodon.social server specifically.
If your account is on another server, <strong>we will not be able to assist
you</strong>. For inquiries not related specifically to the operation of this
server, such as press inquiries about Mastodon gGmbH, please contact <a href=\"mailto:press@joinmastodon.org\">press@joinmastodon.org</a>.
Additional addresses:</p>\n\n<ul>\n<li>Legal, GDPR, DMCA: <a href=\"mailto:legal@mastodon.social\">legal@mastodon.social</a></li>\n<li>Appeals:
<a href=\"mailto:moderation@mastodon.social\">moderation@mastodon.social</a></li>\n</ul>\n\n<h2>Funding</h2>\n\n<p>This
server is crowdfunded by <a href=\"https://patreon.com/mastodon\">Patreon
donations</a>. For a list of sponsors, see <a href=\"https://joinmastodon.org/sponsors\">joinmastodon.org</a>.</p>\n\n<h2>Reporting
and moderation</h2>\n\n<p>When reporting accounts, please make sure to include
at least a few posts that show rule-breaking behaviour, when applicable. If
there is any additional context that might help make a decision, please also
include it in the comment. This is especially important when the content is
in a language nobody on the moderation team speaks.</p>\n\n<p>We usually handle
reports within 24 hours. Please mind that you are not notified when a report
you have made has led to a punitive action, and that not all punitive actions
are externally visible. For first time offenses, we may opt to delete offending
content, escalating to harsher measures on repeat offenses.</p>\n\n<p>We have
a team of paid moderators. If you would like to become a moderator, get in
touch with us through the e-mail address above.</p>\n\n<h2>Impressum</h2>\n\n<p>Mastodon
gGmbH<br>\nM\u00fchlenstra\u00dfe 8a<br>\n14167 Berlin<br>\nGermany</p>\n\n<p>E-Mail-Adresse:
hello@joinmastodon.org</p>\n\n<p>Vertretungsberechtigt: Eugen Rochko (Gesch\u00e4ftsf\u00fchrer)</p>\n\n<p>Umsatzsteuer
Identifikationsnummer (USt-ID): DE344258260</p>\n\n<p>Handelsregister<br>\nGef\u00fchrt
bei: Amtsgericht Charlottenburg<br>\nNummer: HRB 230086 B</p>\n"}'
headers:
Accept-Ranges:
- bytes
Age:
- '285'
Connection:
- keep-alive
Date:
- Sat, 15 Feb 2025 19:55:30 GMT
Strict-Transport-Security:
- max-age=31557600
Vary:
- Origin, Accept-Encoding
X-Cache:
- MISS, HIT, HIT
X-Cache-Hits:
- 0, 5851, 0
X-Served-By:
- cache-fra-eddf8230059-FRA, cache-fra-eddf8230124-FRA, cache-hel1410030-HEL
X-Timer:
- S1739649331.891196,VS0,VE27
alt-svc:
- h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
cache-control:
- max-age=300, public, stale-while-revalidate=30, stale-if-error=86400
content-length:
- '2717'
content-security-policy:
- default-src 'none'; frame-ancestors 'none'; form-action 'none'
content-type:
- application/json; charset=utf-8
etag:
- W/"81bc0d55491772c92fdb0e500f6555be"
referrer-policy:
- same-origin
via:
- 1.1 varnish, 1.1 varnish, 1.1 varnish
x-content-type-options:
- nosniff
x-frame-options:
- DENY
x-ratelimit-limit:
- '300'
x-ratelimit-remaining:
- '299'
x-ratelimit-reset:
- '2025-02-11T11:55:00.271803Z'
x-request-id:
- dd5c99fda0fcf5539af8e792495b66ff
x-runtime:
- '0.012642'
x-xss-protection:
- '0'
status:
code: 200
message: OK
version: 1

Wyświetl plik

@ -0,0 +1,78 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- DUMMY
Connection:
- keep-alive
User-Agent:
- mastodonpy
method: GET
uri: https://mastodon.social/api/v2/filters
response:
body:
string: '[{"id": "202", "title": "animes", "context": ["home"], "expires_at":
null, "filter_action": "warn", "keywords": [{"id": "202", "keyword": "animes",
"whole_word": false}], "statuses": [{"id": "5980", "status_id": "110446223051565765"}]}]'
headers:
Connection:
- keep-alive
Date:
- Sat, 15 Feb 2025 19:55:31 GMT
Strict-Transport-Security:
- max-age=31557600
Vary:
- Authorization, Origin, Accept-Encoding
X-Cache:
- MISS, MISS, MISS
X-Cache-Hits:
- 0, 0, 0
X-Served-By:
- cache-fra-eddf8230082-FRA, cache-fra-eddf8230022-FRA, cache-hel1410022-HEL
X-Timer:
- S1739649331.043302,VS0,VE102
accept-ranges:
- none
alt-svc:
- h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
cache-control:
- private, no-store
content-length:
- '215'
content-security-policy:
- default-src 'none'; frame-ancestors 'none'; form-action 'none'
content-type:
- application/json; charset=utf-8
etag:
- W/"6fa9430258aa6544bfb53d5f1c900c33"
referrer-policy:
- same-origin
transfer-encoding:
- chunked
via:
- 1.1 varnish, 1.1 varnish, 1.1 varnish
x-content-type-options:
- nosniff
x-frame-options:
- DENY
x-ratelimit-limit:
- '300'
x-ratelimit-remaining:
- '298'
x-ratelimit-reset:
- '2025-02-15T20:00:00.107725Z'
x-request-id:
- 30efe8262fc52f47943232a9688ef296
x-runtime:
- '0.034800'
x-xss-protection:
- '0'
status:
code: 200
message: OK
version: 1

Wyświetl plik

@ -0,0 +1,152 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- DUMMY
Connection:
- keep-alive
User-Agent:
- mastodonpy
method: GET
uri: https://mastodon.social/api/v2/filters
response:
body:
string: '[{"id": "202", "title": "animes", "context": ["home"], "expires_at":
null, "filter_action": "warn", "keywords": [{"id": "202", "keyword": "animes",
"whole_word": false}], "statuses": [{"id": "5980", "status_id": "110446223051565765"}]}]'
headers:
Connection:
- keep-alive
Date:
- Sat, 15 Feb 2025 19:55:31 GMT
Strict-Transport-Security:
- max-age=31557600
Vary:
- Authorization, Origin, Accept-Encoding
X-Cache:
- MISS, MISS, MISS
X-Cache-Hits:
- 0, 0, 0
X-Served-By:
- cache-fra-eddf8230125-FRA, cache-fra-eddf8230041-FRA, cache-hel1410024-HEL
X-Timer:
- S1739649331.200928,VS0,VE118
accept-ranges:
- none
alt-svc:
- h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
cache-control:
- private, no-store
content-length:
- '215'
content-security-policy:
- default-src 'none'; frame-ancestors 'none'; form-action 'none'
content-type:
- application/json; charset=utf-8
etag:
- W/"6fa9430258aa6544bfb53d5f1c900c33"
referrer-policy:
- same-origin
transfer-encoding:
- chunked
via:
- 1.1 varnish, 1.1 varnish, 1.1 varnish
x-content-type-options:
- nosniff
x-frame-options:
- DENY
x-ratelimit-limit:
- '300'
x-ratelimit-remaining:
- '297'
x-ratelimit-reset:
- '2025-02-15T20:00:00.283308Z'
x-request-id:
- 31d103b817c26f870e832c3a415368d9
x-runtime:
- '0.031402'
x-xss-protection:
- '0'
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- DUMMY
Connection:
- keep-alive
User-Agent:
- mastodonpy
method: GET
uri: https://mastodon.social/api/v2/filters/202/statuses
response:
body:
string: '[{"id": "5980", "status_id": "110446223051565765"}]'
headers:
Connection:
- keep-alive
Date:
- Sat, 15 Feb 2025 19:55:31 GMT
Strict-Transport-Security:
- max-age=31557600
Vary:
- Authorization, Origin, Accept-Encoding
X-Cache:
- MISS, MISS, MISS
X-Cache-Hits:
- 0, 0, 0
X-Served-By:
- cache-fra-eddf8230119-FRA, cache-fra-eddf8230119-FRA, cache-hel1410024-HEL
X-Timer:
- S1739649331.332717,VS0,VE105
accept-ranges:
- none
alt-svc:
- h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
cache-control:
- private, no-store
content-length:
- '48'
content-security-policy:
- default-src 'none'; frame-ancestors 'none'; form-action 'none'
content-type:
- application/json; charset=utf-8
etag:
- W/"7e9257dcd9be4d889bc9b023eccb8fc6"
referrer-policy:
- same-origin
transfer-encoding:
- chunked
via:
- 1.1 varnish, 1.1 varnish, 1.1 varnish
x-content-type-options:
- nosniff
x-frame-options:
- DENY
x-ratelimit-limit:
- '300'
x-ratelimit-remaining:
- '296'
x-ratelimit-reset:
- '2025-02-15T20:00:00.391244Z'
x-request-id:
- a60a4d8a45c8c94b6bdb2f9623f20ce9
x-runtime:
- '0.044927'
x-xss-protection:
- '0'
status:
code: 200
message: OK
version: 1

Wyświetl plik

@ -13,16 +13,17 @@ interactions:
User-Agent:
- mastodonpy
method: GET
uri: https://mastodon.social/api/v1/filters
uri: https://mastodon.social/api/v2/filters
response:
body:
string: '[{"id": "202", "phrase": "animes", "context": ["home"], "whole_word":
false, "expires_at": null, "irreversible": false}]'
string: '[{"id": "202", "title": "animes", "context": ["home"], "expires_at":
null, "filter_action": "warn", "keywords": [{"id": "202", "keyword": "animes",
"whole_word": false}], "statuses": [{"id": "5980", "status_id": "110446223051565765"}]}]'
headers:
Connection:
- keep-alive
Date:
- Fri, 14 Feb 2025 15:28:12 GMT
- Sat, 15 Feb 2025 19:56:41 GMT
Strict-Transport-Security:
- max-age=31557600
Vary:
@ -32,9 +33,9 @@ interactions:
X-Cache-Hits:
- 0, 0, 0
X-Served-By:
- cache-fra-etou8220054-FRA, cache-fra-etou8220172-FRA, cache-hel1410027-HEL
- cache-fra-eddf8230120-FRA, cache-fra-eddf8230047-FRA, cache-hel1410020-HEL
X-Timer:
- S1739546892.390374,VS0,VE491
- S1739649402.501756,VS0,VE111
accept-ranges:
- none
alt-svc:
@ -42,13 +43,13 @@ interactions:
cache-control:
- private, no-store
content-length:
- '109'
- '215'
content-security-policy:
- default-src 'none'; frame-ancestors 'none'; form-action 'none'
content-type:
- application/json; charset=utf-8
etag:
- W/"57c790beb80237a431ff7945557e5ab3"
- W/"6fa9430258aa6544bfb53d5f1c900c33"
referrer-policy:
- same-origin
transfer-encoding:
@ -62,13 +63,13 @@ interactions:
x-ratelimit-limit:
- '300'
x-ratelimit-remaining:
- '277'
- '291'
x-ratelimit-reset:
- '2025-02-14T15:30:00.715161Z'
- '2025-02-15T20:00:00.577350Z'
x-request-id:
- 494441f0e130e32669b3b81b4c0ad88d
- c1661e88fb7d7340cccf99de7b18d92e
x-runtime:
- '0.418361'
- '0.033533'
x-xss-protection:
- '0'
status:

Wyświetl plik

@ -0,0 +1,78 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- DUMMY
Connection:
- keep-alive
User-Agent:
- mastodonpy
method: GET
uri: https://mastodon.social/api/v2/notifications/policy
response:
body:
string: '{"for_not_following": "accept", "for_not_followers": "accept", "for_new_accounts":
"accept", "for_private_mentions": "accept", "for_limited_accounts": "filter",
"summary": {"pending_requests_count": 0, "pending_notifications_count": 0}}'
headers:
Connection:
- keep-alive
Date:
- Sat, 15 Feb 2025 20:01:04 GMT
Strict-Transport-Security:
- max-age=31557600
Vary:
- Authorization, Origin, Accept-Encoding
X-Cache:
- MISS, MISS, MISS
X-Cache-Hits:
- 0, 0, 0
X-Served-By:
- cache-fra-eddf8230140-FRA, cache-fra-eddf8230053-FRA, cache-hel1410033-HEL
X-Timer:
- S1739649665.798626,VS0,VE147
accept-ranges:
- none
alt-svc:
- h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
cache-control:
- private, no-store
content-length:
- '222'
content-security-policy:
- default-src 'none'; frame-ancestors 'none'; form-action 'none'
content-type:
- application/json; charset=utf-8
etag:
- W/"29586df4e9cf1e205686f64eb490e29e"
referrer-policy:
- same-origin
transfer-encoding:
- chunked
via:
- 1.1 varnish, 1.1 varnish, 1.1 varnish
x-content-type-options:
- nosniff
x-frame-options:
- DENY
x-ratelimit-limit:
- '300'
x-ratelimit-remaining:
- '298'
x-ratelimit-reset:
- '2025-02-15T20:05:00.903440Z'
x-request-id:
- bebb6b8214a02a608958813ade618ee3
x-runtime:
- '0.079582'
x-xss-protection:
- '0'
status:
code: 200
message: OK
version: 1

Wyświetl plik

@ -0,0 +1,78 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- DUMMY
Connection:
- keep-alive
User-Agent:
- mastodonpy
method: GET
uri: https://mastodon.social/api/v2/notifications/policy
response:
body:
string: '{"for_not_following": "accept", "for_not_followers": "accept", "for_new_accounts":
"accept", "for_private_mentions": "accept", "for_limited_accounts": "filter",
"summary": {"pending_requests_count": 0, "pending_notifications_count": 0}}'
headers:
Connection:
- keep-alive
Date:
- Sat, 15 Feb 2025 20:01:05 GMT
Strict-Transport-Security:
- max-age=31557600
Vary:
- Authorization, Origin, Accept-Encoding
X-Cache:
- MISS, MISS, MISS
X-Cache-Hits:
- 0, 0, 0
X-Served-By:
- cache-fra-eddf8230052-FRA, cache-fra-etou8220161-FRA, cache-hel1410031-HEL
X-Timer:
- S1739649665.014981,VS0,VE234
accept-ranges:
- none
alt-svc:
- h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
cache-control:
- private, no-store
content-length:
- '222'
content-security-policy:
- default-src 'none'; frame-ancestors 'none'; form-action 'none'
content-type:
- application/json; charset=utf-8
etag:
- W/"29586df4e9cf1e205686f64eb490e29e"
referrer-policy:
- same-origin
transfer-encoding:
- chunked
via:
- 1.1 varnish, 1.1 varnish, 1.1 varnish
x-content-type-options:
- nosniff
x-frame-options:
- DENY
x-ratelimit-limit:
- '300'
x-ratelimit-remaining:
- '297'
x-ratelimit-reset:
- '2025-02-15T20:05:00.183771Z'
x-request-id:
- 4fa7d4be8aa8a212f35ee5e86581d36b
x-runtime:
- '0.160602'
x-xss-protection:
- '0'
status:
code: 200
message: OK
version: 1

Wyświetl plik

@ -0,0 +1,81 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- DUMMY
Connection:
- keep-alive
User-Agent:
- mastodonpy
method: GET
uri: https://mastodon.social/api/v1/statuses/110446223051565765/source
response:
body:
string: '{"id": "110446223051565765", "text": "<p><span class=\"h-card\"><a
href=\"https://icosahedron.website/@halcy\" class=\"u-url mention\">@<span>halcy</span></a></span>
you&#39;re a doo-doo head</p><p>edit: editing this to have the maximum amount
of fields filled :trans_heart: <a href=\"https://icosahedron.website/tags/ThisIsAHashtag\"
class=\"mention hashtag\" rel=\"tag\">#<span>ThisIsAHashtag</span></a></p>",
"spoiler_text": "test post for mastodon.py stuff"}'
headers:
Connection:
- keep-alive
Date:
- Sat, 15 Feb 2025 20:01:04 GMT
Strict-Transport-Security:
- max-age=31557600
Vary:
- Authorization, Origin, Accept-Encoding
X-Cache:
- MISS, MISS, MISS
X-Cache-Hits:
- 0, 0, 0
X-Served-By:
- cache-fra-etou8220105-FRA, cache-fra-etou8220105-FRA, cache-hel1410027-HEL
X-Timer:
- S1739649664.928341,VS0,VE117
accept-ranges:
- none
alt-svc:
- h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
cache-control:
- private, no-store
content-length:
- '602'
content-security-policy:
- default-src 'none'; frame-ancestors 'none'; form-action 'none'
content-type:
- application/json; charset=utf-8
etag:
- W/"c08a77c7c9c69909bfec060a657d9dfc"
referrer-policy:
- same-origin
transfer-encoding:
- chunked
via:
- 1.1 varnish, 1.1 varnish, 1.1 varnish
x-content-type-options:
- nosniff
x-frame-options:
- DENY
x-ratelimit-limit:
- '300'
x-ratelimit-remaining:
- '299'
x-ratelimit-reset:
- '2025-02-15T20:05:00.004285Z'
x-request-id:
- 1e19f03ab28c52a588eb5b04f651fcef
x-runtime:
- '0.038056'
x-xss-protection:
- '0'
status:
code: 200
message: OK
version: 1

Wyświetl plik

@ -0,0 +1,172 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- DUMMY
Connection:
- keep-alive
User-Agent:
- mastodonpy
method: GET
uri: https://mastodon.social/api/v1/instance/languages
response:
body:
string: '[{"code": "aa", "name": "Afar"}, {"code": "ab", "name": "Abkhaz"},
{"code": "ae", "name": "Avestan"}, {"code": "af", "name": "Afrikaans"}, {"code":
"ak", "name": "Akan"}, {"code": "am", "name": "Amharic"}, {"code": "an", "name":
"Aragonese"}, {"code": "ar", "name": "Arabic"}, {"code": "as", "name": "Assamese"},
{"code": "av", "name": "Avaric"}, {"code": "ay", "name": "Aymara"}, {"code":
"az", "name": "Azerbaijani"}, {"code": "ba", "name": "Bashkir"}, {"code":
"be", "name": "Belarusian"}, {"code": "bg", "name": "Bulgarian"}, {"code":
"bh", "name": "Bihari"}, {"code": "bi", "name": "Bislama"}, {"code": "bm",
"name": "Bambara"}, {"code": "bn", "name": "Bengali"}, {"code": "bo", "name":
"Tibetan"}, {"code": "br", "name": "Breton"}, {"code": "bs", "name": "Bosnian"},
{"code": "ca", "name": "Catalan"}, {"code": "ce", "name": "Chechen"}, {"code":
"ch", "name": "Chamorro"}, {"code": "co", "name": "Corsican"}, {"code": "cr",
"name": "Cree"}, {"code": "cs", "name": "Czech"}, {"code": "cu", "name": "Old
Church Slavonic"}, {"code": "cv", "name": "Chuvash"}, {"code": "cy", "name":
"Welsh"}, {"code": "da", "name": "Danish"}, {"code": "de", "name": "German"},
{"code": "dv", "name": "Divehi"}, {"code": "dz", "name": "Dzongkha"}, {"code":
"ee", "name": "Ewe"}, {"code": "el", "name": "Greek"}, {"code": "en", "name":
"English"}, {"code": "eo", "name": "Esperanto"}, {"code": "es", "name": "Spanish"},
{"code": "et", "name": "Estonian"}, {"code": "eu", "name": "Basque"}, {"code":
"fa", "name": "Persian"}, {"code": "ff", "name": "Fula"}, {"code": "fi", "name":
"Finnish"}, {"code": "fj", "name": "Fijian"}, {"code": "fo", "name": "Faroese"},
{"code": "fr", "name": "French"}, {"code": "fy", "name": "Western Frisian"},
{"code": "ga", "name": "Irish"}, {"code": "gd", "name": "Scottish Gaelic"},
{"code": "gl", "name": "Galician"}, {"code": "gu", "name": "Gujarati"}, {"code":
"gv", "name": "Manx"}, {"code": "ha", "name": "Hausa"}, {"code": "he", "name":
"Hebrew"}, {"code": "hi", "name": "Hindi"}, {"code": "ho", "name": "Hiri Motu"},
{"code": "hr", "name": "Croatian"}, {"code": "ht", "name": "Haitian"}, {"code":
"hu", "name": "Hungarian"}, {"code": "hy", "name": "Armenian"}, {"code": "hz",
"name": "Herero"}, {"code": "ia", "name": "Interlingua"}, {"code": "id", "name":
"Indonesian"}, {"code": "ie", "name": "Interlingue"}, {"code": "ig", "name":
"Igbo"}, {"code": "ii", "name": "Nuosu"}, {"code": "ik", "name": "Inupiaq"},
{"code": "io", "name": "Ido"}, {"code": "is", "name": "Icelandic"}, {"code":
"it", "name": "Italian"}, {"code": "iu", "name": "Inuktitut"}, {"code": "ja",
"name": "Japanese"}, {"code": "jv", "name": "Javanese"}, {"code": "ka", "name":
"Georgian"}, {"code": "kg", "name": "Kongo"}, {"code": "ki", "name": "Kikuyu"},
{"code": "kj", "name": "Kwanyama"}, {"code": "kk", "name": "Kazakh"}, {"code":
"kl", "name": "Kalaallisut"}, {"code": "km", "name": "Khmer"}, {"code": "kn",
"name": "Kannada"}, {"code": "ko", "name": "Korean"}, {"code": "kr", "name":
"Kanuri"}, {"code": "ks", "name": "Kashmiri"}, {"code": "ku", "name": "Kurmanji
(Kurdish)"}, {"code": "kv", "name": "Komi"}, {"code": "kw", "name": "Cornish"},
{"code": "ky", "name": "Kyrgyz"}, {"code": "la", "name": "Latin"}, {"code":
"lb", "name": "Luxembourgish"}, {"code": "lg", "name": "Ganda"}, {"code":
"li", "name": "Limburgish"}, {"code": "ln", "name": "Lingala"}, {"code": "lo",
"name": "Lao"}, {"code": "lt", "name": "Lithuanian"}, {"code": "lu", "name":
"Luba-Katanga"}, {"code": "lv", "name": "Latvian"}, {"code": "mg", "name":
"Malagasy"}, {"code": "mh", "name": "Marshallese"}, {"code": "mi", "name":
"M\u0101ori"}, {"code": "mk", "name": "Macedonian"}, {"code": "ml", "name":
"Malayalam"}, {"code": "mn", "name": "Mongolian"}, {"code": "mr", "name":
"Marathi"}, {"code": "ms", "name": "Malay"}, {"code": "ms-Arab", "name": "Jawi
Malay"}, {"code": "mt", "name": "Maltese"}, {"code": "my", "name": "Burmese"},
{"code": "na", "name": "Nauru"}, {"code": "nb", "name": "Norwegian Bokm\u00e5l"},
{"code": "nd", "name": "Northern Ndebele"}, {"code": "ne", "name": "Nepali"},
{"code": "ng", "name": "Ndonga"}, {"code": "nl", "name": "Dutch"}, {"code":
"nn", "name": "Norwegian Nynorsk"}, {"code": "no", "name": "Norwegian"}, {"code":
"nr", "name": "Southern Ndebele"}, {"code": "nv", "name": "Navajo"}, {"code":
"ny", "name": "Chichewa"}, {"code": "oc", "name": "Occitan"}, {"code": "oj",
"name": "Ojibwe"}, {"code": "om", "name": "Oromo"}, {"code": "or", "name":
"Oriya"}, {"code": "os", "name": "Ossetian"}, {"code": "pa", "name": "Punjabi"},
{"code": "pi", "name": "P\u0101li"}, {"code": "pl", "name": "Polish"}, {"code":
"ps", "name": "Pashto"}, {"code": "pt", "name": "Portuguese"}, {"code": "qu",
"name": "Quechua"}, {"code": "rm", "name": "Romansh"}, {"code": "rn", "name":
"Kirundi"}, {"code": "ro", "name": "Romanian"}, {"code": "ru", "name": "Russian"},
{"code": "rw", "name": "Kinyarwanda"}, {"code": "sa", "name": "Sanskrit"},
{"code": "sc", "name": "Sardinian"}, {"code": "sd", "name": "Sindhi"}, {"code":
"se", "name": "Northern Sami"}, {"code": "sg", "name": "Sango"}, {"code":
"si", "name": "Sinhala"}, {"code": "sk", "name": "Slovak"}, {"code": "sl",
"name": "Slovenian"}, {"code": "sn", "name": "Shona"}, {"code": "so", "name":
"Somali"}, {"code": "sq", "name": "Albanian"}, {"code": "sr", "name": "Serbian"},
{"code": "ss", "name": "Swati"}, {"code": "st", "name": "Southern Sotho"},
{"code": "su", "name": "Sundanese"}, {"code": "sv", "name": "Swedish"}, {"code":
"sw", "name": "Swahili"}, {"code": "ta", "name": "Tamil"}, {"code": "te",
"name": "Telugu"}, {"code": "tg", "name": "Tajik"}, {"code": "th", "name":
"Thai"}, {"code": "ti", "name": "Tigrinya"}, {"code": "tk", "name": "Turkmen"},
{"code": "tl", "name": "Tagalog"}, {"code": "tn", "name": "Tswana"}, {"code":
"to", "name": "Tonga"}, {"code": "tr", "name": "Turkish"}, {"code": "ts",
"name": "Tsonga"}, {"code": "tt", "name": "Tatar"}, {"code": "tw", "name":
"Twi"}, {"code": "ty", "name": "Tahitian"}, {"code": "ug", "name": "Uyghur"},
{"code": "uk", "name": "Ukrainian"}, {"code": "ur", "name": "Urdu"}, {"code":
"uz", "name": "Uzbek"}, {"code": "ve", "name": "Venda"}, {"code": "vi", "name":
"Vietnamese"}, {"code": "vo", "name": "Volap\u00fck"}, {"code": "wa", "name":
"Walloon"}, {"code": "wo", "name": "Wolof"}, {"code": "xh", "name": "Xhosa"},
{"code": "yi", "name": "Yiddish"}, {"code": "yo", "name": "Yoruba"}, {"code":
"za", "name": "Zhuang"}, {"code": "zh", "name": "Chinese"}, {"code": "zu",
"name": "Zulu"}, {"code": "zh-CN", "name": "Chinese (China)"}, {"code": "zh-HK",
"name": "Chinese (Hong Kong)"}, {"code": "zh-TW", "name": "Chinese (Taiwan)"},
{"code": "zh-YUE", "name": "Cantonese"}, {"code": "ast", "name": "Asturian"},
{"code": "chr", "name": "Cherokee"}, {"code": "ckb", "name": "Sorani (Kurdish)"},
{"code": "cnr", "name": "Montenegrin"}, {"code": "csb", "name": "Kashubian"},
{"code": "gsw", "name": "Swiss German"}, {"code": "jbo", "name": "Lojban"},
{"code": "kab", "name": "Kabyle"}, {"code": "ldn", "name": "L\u00e1adan"},
{"code": "lfn", "name": "Lingua Franca Nova"}, {"code": "moh", "name": "Mohawk"},
{"code": "nds", "name": "Low German"}, {"code": "pdc", "name": "Pennsylvania
Dutch"}, {"code": "sco", "name": "Scots"}, {"code": "sma", "name": "Southern
Sami"}, {"code": "smj", "name": "Lule Sami"}, {"code": "szl", "name": "Silesian"},
{"code": "tok", "name": "Toki Pona"}, {"code": "vai", "name": "Vai"}, {"code":
"xal", "name": "Kalmyk"}, {"code": "zba", "name": "Balaibalan"}, {"code":
"zgh", "name": "Standard Moroccan Tamazight"}]'
headers:
Accept-Ranges:
- bytes
Age:
- '211'
Connection:
- keep-alive
Date:
- Sat, 15 Feb 2025 20:01:11 GMT
Strict-Transport-Security:
- max-age=31557600
Vary:
- Origin, Accept-Encoding
X-Cache:
- MISS, HIT, HIT
X-Cache-Hits:
- 0, 259628, 0
X-Served-By:
- cache-fra-etou8220065-FRA, cache-fra-etou8220065-FRA, cache-hel1410024-HEL
X-Timer:
- S1739649672.524730,VS0,VE30
alt-svc:
- h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
cache-control:
- max-age=300, public, stale-while-revalidate=30, stale-if-error=86400
content-length:
- '6687'
content-security-policy:
- default-src 'none'; frame-ancestors 'none'; form-action 'none'
content-type:
- application/json; charset=utf-8
etag:
- W/"42221a0200c9115423257ae246c8f804"
referrer-policy:
- same-origin
via:
- 1.1 varnish, 1.1 varnish, 1.1 varnish
x-content-type-options:
- nosniff
x-frame-options:
- DENY
x-ratelimit-limit:
- '300'
x-ratelimit-remaining:
- '261'
x-ratelimit-reset:
- '2025-01-22T10:45:00.357592Z'
x-request-id:
- f3bcec8a78ca06c562ecd9a0c9d79038
x-runtime:
- '0.045027'
x-xss-protection:
- '0'
status:
code: 200
message: OK
version: 1

Wyświetl plik

@ -0,0 +1,253 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- DUMMY
Connection:
- keep-alive
User-Agent:
- mastodonpy
method: GET
uri: https://mastodon.social/api/v1/trends/links
response:
body:
string: '[{"url": "https://www.404media.co/anyone-can-push-updates-to-the-doge-gov-website-2/",
"title": "Anyone Can Push Updates to the DOGE.gov Website", "description":
"\"THESE ''EXPERTS'' LEFT THEIR DATABASE OPEN.\"", "language": "en", "type":
"link", "author_name": "", "author_url": "", "provider_name": "404 Media",
"provider_url": "", "html": "", "width": 651, "height": 354, "image": "https://files.mastodon.social/cache/preview_cards/images/132/652/125/original/45869b8507859974.png",
"image_description": "", "embed_url": "", "blurhash": "U12$N$ae9Exu-;t6Rjoexut7xuV@-;t7j[WB",
"published_at": "2025-02-14T06:42:14.000Z", "history": [{"day": "1739577600",
"accounts": "145", "uses": "154"}, {"day": "1739491200", "accounts": "1878",
"uses": "2146"}, {"day": "1739404800", "accounts": "0", "uses": "0"}, {"day":
"1739318400", "accounts": "0", "uses": "0"}, {"day": "1739232000", "accounts":
"0", "uses": "0"}, {"day": "1739145600", "accounts": "0", "uses": "0"}, {"day":
"1739059200", "accounts": "0", "uses": "0"}], "authors": []}, {"url": "https://www.wired.com/story/cisa-election-security-freeze-memo/",
"title": "Top US Election Security Watchdog Forced to Stop Election Security
Work", "description": "The US Cybersecurity and Infrastructure Security Agency
has frozen efforts to aid states in securing elections, according to an internal
memo viewed by WIRED.", "language": "en", "type": "link", "author_name": "Eric
Geller", "author_url": "", "provider_name": "WIRED", "provider_url": "", "html":
"", "width": 663, "height": 347, "image": "https://files.mastodon.social/cache/preview_cards/images/132/800/506/original/eace1cc0a73ddda9.jpeg",
"image_description": "", "embed_url": "", "blurhash": "UcM7S]^+xaoy~pE1M|s:t6M{t7jbayt6ofWU",
"published_at": "2025-02-15T03:07:33.578Z", "history": [{"day": "1739577600",
"accounts": "239", "uses": "247"}, {"day": "1739491200", "accounts": "0",
"uses": "0"}, {"day": "1739404800", "accounts": "0", "uses": "0"}, {"day":
"1739318400", "accounts": "0", "uses": "0"}, {"day": "1739232000", "accounts":
"0", "uses": "0"}, {"day": "1739145600", "accounts": "0", "uses": "0"}, {"day":
"1739059200", "accounts": "0", "uses": "0"}], "authors": [{"name": "Eric Geller",
"url": "", "account": null}]}, {"url": "https://www.nbcnews.com/politics/national-security/trump-administration-wants-un-fire-nuclear-safety-workers-cant-figure-rcna192345",
"title": "Trump administration wants to un-fire nuclear safety workers but
can\u2019t figure out how to reach them", "description": "National Nuclear
Security Administration officials attempted to notify some employees who had
been let go that they are now due to be reinstated but struggled to find them
because they didn''t have their new contact information.", "language": "en",
"type": "link", "author_name": "Peter Alexander", "author_url": "https://www.nbcnews.com/author/peter-alexander-ncpn945076",
"provider_name": "NBC News", "provider_url": "", "html": "", "width": 588,
"height": 392, "image": "https://files.mastodon.social/cache/preview_cards/images/132/878/103/original/eb03a0dcc0a659ea.jpg",
"image_description": "", "embed_url": "", "blurhash": "UQG[M}4@tKV}~8IqENMyNIoeR.bcx]jZnhxt",
"published_at": "2025-02-15T17:22:26.435Z", "history": [{"day": "1739577600",
"accounts": "195", "uses": "205"}, {"day": "1739491200", "accounts": "0",
"uses": "0"}, {"day": "1739404800", "accounts": "0", "uses": "0"}, {"day":
"1739318400", "accounts": "0", "uses": "0"}, {"day": "1739232000", "accounts":
"0", "uses": "0"}, {"day": "1739145600", "accounts": "0", "uses": "0"}, {"day":
"1739059200", "accounts": "0", "uses": "0"}], "authors": [{"name": "Peter
Alexander", "url": "https://www.nbcnews.com/author/peter-alexander-ncpn945076",
"account": null}]}, {"url": "https://www.wired.com/story/elon-musks-toxicity-could-spell-disaster-for-tesla/",
"title": "Elon Musk\u2019s Toxicity Could Spell Disaster for Tesla", "description":
"Staggering sales drops, swastika-daubed EVs, companies culling fleet models,
and fan-forum owners selling their cars\u2014Elon Musk''s alt-right antics
are seriously impacting his electric car business.", "language": "en", "type":
"link", "author_name": "Carlton Reid", "author_url": "", "provider_name":
"WIRED", "provider_url": "", "html": "", "width": 663, "height": 347, "image":
"https://files.mastodon.social/cache/preview_cards/images/132/679/772/original/7f218703e102dc73.jpg",
"image_description": "", "embed_url": "", "blurhash": "UcCya%sUAqSgWVSMfQsU1^SM$5sAsUwxWpJl",
"published_at": "2025-02-13T14:30:00.000Z", "history": [{"day": "1739577600",
"accounts": "98", "uses": "99"}, {"day": "1739491200", "accounts": "318",
"uses": "328"}, {"day": "1739404800", "accounts": "0", "uses": "0"}, {"day":
"1739318400", "accounts": "0", "uses": "0"}, {"day": "1739232000", "accounts":
"0", "uses": "0"}, {"day": "1739145600", "accounts": "0", "uses": "0"}, {"day":
"1739059200", "accounts": "0", "uses": "0"}], "authors": [{"name": "Carlton
Reid", "url": "", "account": null}]}, {"url": "https://abcnews.go.com/Politics/dhs-cuts-405-employees-workforce/story?id=118847047",
"title": "DHS cuts at least 405 employees from workforce", "description":
"The bulk of the cuts were at the Federal Emergency Management Agency.", "language":
"en", "type": "link", "author_name": "Luke Barr", "author_url": "https://abcnews.go.com/author/luke_barr",
"provider_name": "ABC News", "provider_url": "", "html": "", "width": 640,
"height": 360, "image": "https://files.mastodon.social/cache/preview_cards/images/132/785/643/original/59983bae3c35f1e8.jpg",
"image_description": "", "embed_url": "", "blurhash": "UBB|BFk80J4nDhxvkCxuxaM_x^%MD$RkRjog",
"published_at": "2025-02-14T23:31:00.000Z", "history": [{"day": "1739577600",
"accounts": "123", "uses": "124"}, {"day": "1739491200", "accounts": "1",
"uses": "1"}, {"day": "1739404800", "accounts": "0", "uses": "0"}, {"day":
"1739318400", "accounts": "0", "uses": "0"}, {"day": "1739232000", "accounts":
"0", "uses": "0"}, {"day": "1739145600", "accounts": "0", "uses": "0"}, {"day":
"1739059200", "accounts": "0", "uses": "0"}], "authors": [{"name": "Luke Barr",
"url": "https://abcnews.go.com/author/luke_barr", "account": null}]}, {"url":
"https://www.joanwestenberg.com/your-world-is-burning-heres-what-you-can-actually-do-about-it/",
"title": "Your World Is Burning. Here''s What You Can Actually Do About\u00a0It.",
"description": "Everything hurts right now.\n\nYou open your phone. War. Collapse.
Crisis. Corruption. Some days, it feels like watching the world burn down
to ash in real-time.\n\nThe weight of powerlessness settles in.\u00a0\n\nThe
crush of too much information, too little agency.\u00a0\n\nThe vertigo of
trying to find solid ground in", "language": "en", "type": "link", "author_name":
"", "author_url": "", "provider_name": "westenberg.", "provider_url": "",
"html": "", "width": 588, "height": 392, "image": "https://files.mastodon.social/cache/preview_cards/images/132/842/785/original/2e73e8da9cb61830.jpg",
"image_description": "", "embed_url": "", "blurhash": "UrJG}:t7Ipoe~Ut6Rka|R-a}j[WCjuR+j[ay",
"published_at": "2025-02-15T11:42:44.000Z", "history": [{"day": "1739577600",
"accounts": "123", "uses": "128"}, {"day": "1739491200", "accounts": "0",
"uses": "0"}, {"day": "1739404800", "accounts": "0", "uses": "0"}, {"day":
"1739318400", "accounts": "0", "uses": "0"}, {"day": "1739232000", "accounts":
"0", "uses": "0"}, {"day": "1739145600", "accounts": "0", "uses": "0"}, {"day":
"1739059200", "accounts": "0", "uses": "0"}], "authors": []}, {"url": "https://www.thedailybeast.com/singer-sheryl-crow-blasts-president-musk-as-she-sells-tesla-in-viral-clip/",
"title": "Sheryl Crow Blasts \u2018President Musk\u2019 as She Sells Tesla
in Viral Clip", "description": "\u201cMy parents always said\u2026 you are
who you hang out with,\u201d said the nine-time Grammy winner as she waved
goodbye to her car. ", "language": "en", "type": "link", "author_name": "Emell
Derra Adolphus", "author_url": "https://www.thedailybeast.com/author/emell-derra-adolphus/",
"provider_name": "The Daily Beast", "provider_url": "", "html": "", "width":
662, "height": 348, "image": "https://files.mastodon.social/cache/preview_cards/images/132/855/408/original/73f6ab9186fbe8b9.jpg",
"image_description": "LOS ANGELES, CALIFORNIA - FEBRUARY 02: (FOR EDITORIAL
USE ONLY) Sheryl Crow attends the 67th GRAMMY Awards on February 02, 2025
in Los Angeles, California. (Photo by Frazer Harrison/Getty Images)", "embed_url":
"", "blurhash": "UPG8fq~W0%SP.S-;%LkC%Mt7nhoJxta{M|WB", "published_at": "2025-02-15T13:21:06.424Z",
"history": [{"day": "1739577600", "accounts": "113", "uses": "116"}, {"day":
"1739491200", "accounts": "0", "uses": "0"}, {"day": "1739404800", "accounts":
"0", "uses": "0"}, {"day": "1739318400", "accounts": "0", "uses": "0"}, {"day":
"1739232000", "accounts": "0", "uses": "0"}, {"day": "1739145600", "accounts":
"0", "uses": "0"}, {"day": "1739059200", "accounts": "0", "uses": "0"}], "authors":
[{"name": "Emell Derra Adolphus", "url": "https://www.thedailybeast.com/author/emell-derra-adolphus/",
"account": null}]}, {"url": "https://www.nbcnews.com/politics/national-security/trump-officials-us-owning-half-ukraine-rare-earth-minerals-rcna192325",
"title": "Trump officials pitch Ukraine on US owning 50% of its rare earth
minerals", "description": "The Trump administration indicated U.S. troops
could be deployed to provide security in connection with the minerals if there''s
a peace deal with Russia, sources told NBC News.", "language": "en", "type":
"link", "author_name": "Courtney Kube", "author_url": "https://www.nbcnews.com/author/courtney-kube-ncpn3621",
"provider_name": "NBC News", "provider_url": "", "html": "", "width": 588,
"height": 392, "image": "https://files.mastodon.social/cache/preview_cards/images/132/806/851/original/7fb30e9497350b2b.jpg",
"image_description": "", "embed_url": "", "blurhash": "UkOCKNET.i,@VhNf5ZRPIvoLN2R+Rlk8oNs:",
"published_at": "2025-02-15T04:01:59.421Z", "history": [{"day": "1739577600",
"accounts": "101", "uses": "105"}, {"day": "1739491200", "accounts": "0",
"uses": "0"}, {"day": "1739404800", "accounts": "0", "uses": "0"}, {"day":
"1739318400", "accounts": "0", "uses": "0"}, {"day": "1739232000", "accounts":
"0", "uses": "0"}, {"day": "1739145600", "accounts": "0", "uses": "0"}, {"day":
"1739059200", "accounts": "0", "uses": "0"}], "authors": [{"name": "Courtney
Kube", "url": "https://www.nbcnews.com/author/courtney-kube-ncpn3621", "account":
null}]}, {"url": "https://edition.cnn.com/2025/02/14/climate/nuclear-nnsa-firings-trump/index.html",
"title": "Trump officials fired nuclear staff not realizing they oversee the
country\u2019s weapons stockpile, sources say", "description": "Some of the
fired probationary employees included on-the-ground staff at facilities where
nuclear weapons are built.", "language": "en", "type": "link", "author_name":
"Rene Marsh", "author_url": "https://www.cnn.com/profiles/rene-marsh-profile",
"provider_name": "CNN", "provider_url": "", "html": "", "width": 640, "height":
360, "image": "https://files.mastodon.social/cache/preview_cards/images/132/793/089/original/510d955d1c25a4bf.jpg",
"image_description": "", "embed_url": "", "blurhash": "Uc7.%b%%RjIoROWBo#oeNbR-oLxDofofWXWB",
"published_at": "2025-02-15T00:21:08.895Z", "history": [{"day": "1739577600",
"accounts": "89", "uses": "93"}, {"day": "1739491200", "accounts": "0", "uses":
"0"}, {"day": "1739404800", "accounts": "0", "uses": "0"}, {"day": "1739318400",
"accounts": "0", "uses": "0"}, {"day": "1739232000", "accounts": "0", "uses":
"0"}, {"day": "1739145600", "accounts": "0", "uses": "0"}, {"day": "1739059200",
"accounts": "0", "uses": "0"}], "authors": [{"name": "Rene Marsh", "url":
"https://www.cnn.com/profiles/rene-marsh-profile", "account": null}]}, {"url":
"https://www.propublica.org/article/department-of-education-civil-rights-office-investigations",
"title": "\u201cWe\u2019ve Been Essentially Muzzled\u201d: Department of Education
Halts Thousands of Civil Rights Investigations Under Trump", "description":
"Since Inauguration Day, the Office for Civil Rights has only opened about
20 investigations focused on Trump\u2019s priorities, placing more than 10,000
student complaints related to disability access and sexual and racial harassment
on hold.", "language": "en", "type": "link", "author_name": "", "author_url":
"", "provider_name": "ProPublica", "provider_url": "", "html": "", "width":
662, "height": 348, "image": "https://files.mastodon.social/cache/preview_cards/images/132/631/075/original/12c5b6a593251ce2.jpg",
"image_description": "", "embed_url": "", "blurhash": "UTGHezS~S~r?vMEfXSrr~BE#EMrX$jIpX8ni",
"published_at": null, "history": [{"day": "1739577600", "accounts": "19",
"uses": "19"}, {"day": "1739491200", "accounts": "227", "uses": "235"}, {"day":
"1739404800", "accounts": "0", "uses": "0"}, {"day": "1739318400", "accounts":
"0", "uses": "0"}, {"day": "1739232000", "accounts": "0", "uses": "0"}, {"day":
"1739145600", "accounts": "0", "uses": "0"}, {"day": "1739059200", "accounts":
"0", "uses": "0"}], "authors": [{"name": "", "url": "", "account": {"id":
"109365953730768772", "username": "ProPublica", "acct": "ProPublica@newsie.social",
"display_name": "ProPublica", "locked": false, "bot": false, "discoverable":
true, "indexable": true, "group": false, "created_at": "2022-11-18T00:00:00.000Z",
"note": "<p>The official Mastodon page for ProPublica.</p><p>Pursuing stories
with moral force.</p>", "url": "https://newsie.social/@ProPublica", "uri":
"https://newsie.social/users/ProPublica", "avatar": "https://files.mastodon.social/cache/accounts/avatars/109/365/953/730/768/772/original/35b610e44723d0cd.png",
"avatar_static": "https://files.mastodon.social/cache/accounts/avatars/109/365/953/730/768/772/original/35b610e44723d0cd.png",
"header": "https://files.mastodon.social/cache/accounts/headers/109/365/953/730/768/772/original/e82d4bb6770487f3.png",
"header_static": "https://files.mastodon.social/cache/accounts/headers/109/365/953/730/768/772/original/e82d4bb6770487f3.png",
"followers_count": 145748, "following_count": 162, "statuses_count": 2942,
"last_status_at": "2025-02-15", "hide_collections": false, "emojis": [], "fields":
[{"name": "Website", "value": "<a href=\"https://www.propublica.org/\" rel=\"nofollow
noopener\" translate=\"no\" target=\"_blank\"><span class=\"invisible\">https://www.</span><span
class=\"\">propublica.org/</span><span class=\"invisible\"></span></a>", "verified_at":
null}, {"name": "Send us things", "value": "<a href=\"https://www.propublica.org/tips/\"
rel=\"nofollow noopener\" translate=\"no\" target=\"_blank\"><span class=\"invisible\">https://www.</span><span
class=\"\">propublica.org/tips/</span><span class=\"invisible\"></span></a>",
"verified_at": null}, {"name": "Get our newsletter", "value": "<a href=\"https://www.propublica.org/newsletters/the-big-story\"
rel=\"nofollow noopener\" translate=\"no\" target=\"_blank\"><span class=\"invisible\">https://www.</span><span
class=\"ellipsis\">propublica.org/newsletters/the</span><span class=\"invisible\">-big-story</span></a>",
"verified_at": null}, {"name": "Verified Journalist", "value": "<a href=\"https://www.verifiedjournalist.org/people/@ProPublica@newsie.social\"
rel=\"nofollow noopener\" translate=\"no\" target=\"_blank\"><span class=\"invisible\">https://www.</span><span
class=\"ellipsis\">verifiedjournalist.org/people/</span><span class=\"invisible\">@ProPublica@newsie.social</span></a>",
"verified_at": null}]}}]}]'
headers:
Connection:
- keep-alive
Date:
- Sat, 15 Feb 2025 19:55:24 GMT
Strict-Transport-Security:
- max-age=31557600
Vary:
- Authorization, Accept-Language, Origin, Accept-Encoding
X-Cache:
- MISS, MISS, MISS
X-Cache-Hits:
- 0, 0, 0
X-Served-By:
- cache-fra-eddf8230120-FRA, cache-fra-eddf8230058-FRA, cache-hel1410020-HEL
X-Timer:
- S1739649324.198916,VS0,VE291
accept-ranges:
- none
alt-svc:
- h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
cache-control:
- private, no-store
content-length:
- '14972'
content-security-policy:
- default-src 'none'; frame-ancestors 'none'; form-action 'none'
content-type:
- application/json; charset=utf-8
etag:
- W/"7bb11de72aaa1fc92c345a08b9fb3132"
link:
- <https://mastodon.social/api/v1/trends/links?offset=10>; rel="next"
referrer-policy:
- same-origin
transfer-encoding:
- chunked
via:
- 1.1 varnish, 1.1 varnish, 1.1 varnish
x-content-type-options:
- nosniff
x-frame-options:
- DENY
x-ratelimit-limit:
- '300'
x-ratelimit-remaining:
- '299'
x-ratelimit-reset:
- '2025-02-15T20:00:00.266977Z'
x-request-id:
- b5fa7b1b803a0b25d31e60702facad70
x-runtime:
- '0.230796'
x-xss-protection:
- '0'
status:
code: 200
message: OK
version: 1

Wyświetl plik

@ -0,0 +1,76 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- DUMMY
Connection:
- keep-alive
User-Agent:
- mastodonpy
method: GET
uri: https://mastodon.social/api/v1/notifications/unread_count
response:
body:
string: '{"count": 0}'
headers:
Connection:
- keep-alive
Date:
- Sat, 15 Feb 2025 19:55:41 GMT
Strict-Transport-Security:
- max-age=31557600
Vary:
- Authorization, Origin, Accept-Encoding
X-Cache:
- MISS, MISS, MISS
X-Cache-Hits:
- 0, 0, 0
X-Served-By:
- cache-fra-etou8220080-FRA, cache-fra-etou8220042-FRA, cache-hel1410023-HEL
X-Timer:
- S1739649341.922871,VS0,VE112
accept-ranges:
- none
alt-svc:
- h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
cache-control:
- private, no-store
content-length:
- '11'
content-security-policy:
- default-src 'none'; frame-ancestors 'none'; form-action 'none'
content-type:
- application/json; charset=utf-8
etag:
- W/"618de7d9f46f3f697d827a1b6d849747"
referrer-policy:
- same-origin
transfer-encoding:
- chunked
via:
- 1.1 varnish, 1.1 varnish, 1.1 varnish
x-content-type-options:
- nosniff
x-frame-options:
- DENY
x-ratelimit-limit:
- '300'
x-ratelimit-remaining:
- '292'
x-ratelimit-reset:
- '2025-02-15T20:00:00.996172Z'
x-request-id:
- 952c3f8f7db39010177fc4bb2127a61b
x-runtime:
- '0.047408'
x-xss-protection:
- '0'
status:
code: 200
message: OK
version: 1

Wyświetl plik

@ -378,10 +378,9 @@ def test_entity_filter(mastodon_base, mastodon_admin):
match_on=['method', 'uri'],
cassette_library_dir='tests/cassettes_entity_tests'
)
@pytest.mark.skip(reason="FilterV2 is not implemented in Mastodon.py yet")
def test_entity_filterv2(mastodon_base, mastodon_admin):
mastodon = mastodon_base
result = mastodon.filters()[0]
result = mastodon.filters_v2()[0]
assert real_issubclass(type(result), FilterV2), str(type(result)) + ' is not a subclass of FilterV2'
result = Entity.from_json(result.to_json())
if sys.version_info >= (3, 9):
@ -589,6 +588,23 @@ def test_entity_previewcard(mastodon_base, mastodon_admin):
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), PreviewCard), str(type(result)) + ' is not a subclass of PreviewCard after to_json/from_json'
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_headers=[('Authorization', 'DUMMY')],
before_record_request=vcr_filter,
before_record_response=token_scrubber,
match_on=['method', 'uri'],
cassette_library_dir='tests/cassettes_entity_tests'
)
def test_entity_trendinglinkhistory(mastodon_base, mastodon_admin):
mastodon = mastodon_base
result = mastodon.trending_links()[0].history[0]
assert real_issubclass(type(result), TrendingLinkHistory), str(type(result)) + ' is not a subclass of TrendingLinkHistory'
result = Entity.from_json(result.to_json())
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), TrendingLinkHistory), str(type(result)) + ' is not a subclass of TrendingLinkHistory after to_json/from_json'
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
@ -1425,6 +1441,109 @@ def test_entity_admindomainblock(mastodon_base, mastodon_admin):
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), AdminDomainBlock), str(type(result)) + ' is not a subclass of AdminDomainBlock after to_json/from_json'
@pytest.mark.skip(reason="Admin functions are not tested by default")
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_headers=[('Authorization', 'DUMMY')],
before_record_request=vcr_filter,
before_record_response=token_scrubber,
match_on=['method', 'uri'],
cassette_library_dir='tests/cassettes_entity_tests'
)
def test_entity_adminipblock(mastodon_base, mastodon_admin):
mastodon = mastodon_admin
result = mastodon.admin_ip_blocks()[0]
assert real_issubclass(type(result), AdminIpBlock), str(type(result)) + ' is not a subclass of AdminIpBlock'
result = Entity.from_json(result.to_json())
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), AdminIpBlock), str(type(result)) + ' is not a subclass of AdminIpBlock after to_json/from_json'
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_headers=[('Authorization', 'DUMMY')],
before_record_request=vcr_filter,
before_record_response=token_scrubber,
match_on=['method', 'uri'],
cassette_library_dir='tests/cassettes_entity_tests'
)
def test_entity_domainblock(mastodon_base, mastodon_admin):
mastodon = mastodon_admin
result = mastodon.instance_domain_blocks()[0]
assert real_issubclass(type(result), DomainBlock), str(type(result)) + ' is not a subclass of DomainBlock'
result = Entity.from_json(result.to_json())
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), DomainBlock), str(type(result)) + ' is not a subclass of DomainBlock after to_json/from_json'
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_headers=[('Authorization', 'DUMMY')],
before_record_request=vcr_filter,
before_record_response=token_scrubber,
match_on=['method', 'uri'],
cassette_library_dir='tests/cassettes_entity_tests'
)
def test_entity_extendeddescription(mastodon_base, mastodon_admin):
mastodon = mastodon_base
result = mastodon.instance_extended_description()
assert real_issubclass(type(result), ExtendedDescription), str(type(result)) + ' is not a subclass of ExtendedDescription'
result = Entity.from_json(result.to_json())
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), ExtendedDescription), str(type(result)) + ' is not a subclass of ExtendedDescription after to_json/from_json'
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_headers=[('Authorization', 'DUMMY')],
before_record_request=vcr_filter,
before_record_response=token_scrubber,
match_on=['method', 'uri'],
cassette_library_dir='tests/cassettes_entity_tests'
)
def test_entity_filterkeyword(mastodon_base, mastodon_admin):
mastodon = mastodon_base
result = mastodon.filters_v2()[0].keywords[0]
assert real_issubclass(type(result), FilterKeyword), str(type(result)) + ' is not a subclass of FilterKeyword'
result = Entity.from_json(result.to_json())
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), FilterKeyword), str(type(result)) + ' is not a subclass of FilterKeyword after to_json/from_json'
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_headers=[('Authorization', 'DUMMY')],
before_record_request=vcr_filter,
before_record_response=token_scrubber,
match_on=['method', 'uri'],
cassette_library_dir='tests/cassettes_entity_tests'
)
def test_entity_filterstatus(mastodon_base, mastodon_admin):
mastodon = mastodon_base
result = mastodon.filter_statuses_v2(mastodon.filters_v2()[0])[0]
assert real_issubclass(type(result), FilterStatus), str(type(result)) + ' is not a subclass of FilterStatus'
result = Entity.from_json(result.to_json())
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), FilterStatus), str(type(result)) + ' is not a subclass of FilterStatus after to_json/from_json'
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_headers=[('Authorization', 'DUMMY')],
before_record_request=vcr_filter,
before_record_response=token_scrubber,
match_on=['method', 'uri'],
cassette_library_dir='tests/cassettes_entity_tests'
)
def test_entity_statussource(mastodon_base, mastodon_admin):
mastodon = mastodon_base
result = mastodon.status_source(110446223051565765)
assert real_issubclass(type(result), StatusSource), str(type(result)) + ' is not a subclass of StatusSource'
result = Entity.from_json(result.to_json())
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), StatusSource), str(type(result)) + ' is not a subclass of StatusSource after to_json/from_json'
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
@ -1493,3 +1612,122 @@ def test_entity_accountcreationerrordetailsfield(mastodon_base, mastodon_admin):
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), AccountCreationErrorDetailsField), str(type(result)) + ' is not a subclass of AccountCreationErrorDetailsField after to_json/from_json'
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_headers=[('Authorization', 'DUMMY')],
before_record_request=vcr_filter,
before_record_response=token_scrubber,
match_on=['method', 'uri'],
cassette_library_dir='tests/cassettes_entity_tests'
)
def test_entity_notificationpolicy(mastodon_base, mastodon_admin):
mastodon = mastodon_base
result = mastodon.notifications_policy()
assert real_issubclass(type(result), NotificationPolicy), str(type(result)) + ' is not a subclass of NotificationPolicy'
result = Entity.from_json(result.to_json())
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), NotificationPolicy), str(type(result)) + ' is not a subclass of NotificationPolicy after to_json/from_json'
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_headers=[('Authorization', 'DUMMY')],
before_record_request=vcr_filter,
before_record_response=token_scrubber,
match_on=['method', 'uri'],
cassette_library_dir='tests/cassettes_entity_tests'
)
def test_entity_notificationpolicysummary(mastodon_base, mastodon_admin):
mastodon = mastodon_base
result = mastodon.notifications_policy().summary
assert real_issubclass(type(result), NotificationPolicySummary), str(type(result)) + ' is not a subclass of NotificationPolicySummary'
result = Entity.from_json(result.to_json())
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), NotificationPolicySummary), str(type(result)) + ' is not a subclass of NotificationPolicySummary after to_json/from_json'
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_headers=[('Authorization', 'DUMMY')],
before_record_request=vcr_filter,
before_record_response=token_scrubber,
match_on=['method', 'uri'],
cassette_library_dir='tests/cassettes_entity_tests'
)
def test_entity_groupednotificationsresults(mastodon_base, mastodon_admin):
mastodon = mastodon_base
result = mastodon.grouped_notifications()
assert real_issubclass(type(result), GroupedNotificationsResults), str(type(result)) + ' is not a subclass of GroupedNotificationsResults'
result = Entity.from_json(result.to_json())
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), GroupedNotificationsResults), str(type(result)) + ' is not a subclass of GroupedNotificationsResults after to_json/from_json'
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_headers=[('Authorization', 'DUMMY')],
before_record_request=vcr_filter,
before_record_response=token_scrubber,
match_on=['method', 'uri'],
cassette_library_dir='tests/cassettes_entity_tests'
)
def test_entity_partialaccountwithavatar(mastodon_base, mastodon_admin):
mastodon = mastodon_admin
result = mastodon.grouped_notifications().partial_accounts[0]
assert real_issubclass(type(result), PartialAccountWithAvatar), str(type(result)) + ' is not a subclass of PartialAccountWithAvatar'
result = Entity.from_json(result.to_json())
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), PartialAccountWithAvatar), str(type(result)) + ' is not a subclass of PartialAccountWithAvatar after to_json/from_json'
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_headers=[('Authorization', 'DUMMY')],
before_record_request=vcr_filter,
before_record_response=token_scrubber,
match_on=['method', 'uri'],
cassette_library_dir='tests/cassettes_entity_tests'
)
def test_entity_notificationgroup(mastodon_base, mastodon_admin):
mastodon = mastodon_base
result = mastodon.grouped_notifications().notification_groups[0]
assert real_issubclass(type(result), NotificationGroup), str(type(result)) + ' is not a subclass of NotificationGroup'
result = Entity.from_json(result.to_json())
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), NotificationGroup), str(type(result)) + ' is not a subclass of NotificationGroup after to_json/from_json'
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_headers=[('Authorization', 'DUMMY')],
before_record_request=vcr_filter,
before_record_response=token_scrubber,
match_on=['method', 'uri'],
cassette_library_dir='tests/cassettes_entity_tests'
)
def test_entity_unreadnotificationscount(mastodon_base, mastodon_admin):
mastodon = mastodon_base
result = mastodon.notifications_unread_count()
assert real_issubclass(type(result), UnreadNotificationsCount), str(type(result)) + ' is not a subclass of UnreadNotificationsCount'
result = Entity.from_json(result.to_json())
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), UnreadNotificationsCount), str(type(result)) + ' is not a subclass of UnreadNotificationsCount after to_json/from_json'
@pytest.mark.vcr(
filter_query_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_post_data_parameters=[('access_token', 'DUMMY'), ('client_id', 'DUMMY'), ('client_secret', 'DUMMY')],
filter_headers=[('Authorization', 'DUMMY')],
before_record_request=vcr_filter,
before_record_response=token_scrubber,
match_on=['method', 'uri'],
cassette_library_dir='tests/cassettes_entity_tests'
)
def test_entity_supportedlocale(mastodon_base, mastodon_admin):
mastodon = mastodon_base
result = mastodon.instance_languages()[0]
assert real_issubclass(type(result), SupportedLocale), str(type(result)) + ' is not a subclass of SupportedLocale'
result = Entity.from_json(result.to_json())
if sys.version_info >= (3, 9):
assert real_issubclass(type(result), SupportedLocale), str(type(result)) + ' is not a subclass of SupportedLocale after to_json/from_json'