diff --git a/mailerlite/sdk/subscribers.py b/mailerlite/sdk/subscribers.py index 361fc3e..02b7f65 100644 --- a/mailerlite/sdk/subscribers.py +++ b/mailerlite/sdk/subscribers.py @@ -155,10 +155,13 @@ def get(self, subscriber_id): :rtype: dict """ - valid = re.search(r"[\w.]+\@[\w.]+", subscriber_id) + if not isinstance(subscriber_id, int): + valid = re.search(r"[\w.]+\@[\w.]+", subscriber_id) - if not valid and not isinstance(subscriber_id, int): - raise TypeError("Provided email address or subscriber id are not valid.") + if not valid: + raise TypeError( + "Provided email address or subscriber id are not valid." + ) return self.api_client.request( "GET", f"{self.base_api_url}/{subscriber_id}" diff --git a/tests/subscribers_test.py b/tests/subscribers_test.py index e1a263f..e7ef9b3 100644 --- a/tests/subscribers_test.py +++ b/tests/subscribers_test.py @@ -166,9 +166,10 @@ def test_given_invalid_subscriber_id_when_calling_get_then_returning_subscirber_ self.client.subscribers.get("abcdefgh") @vcr.use_cassette( - "tests/vcr_cassettes/subscribers-get.yml", filter_headers=["Authorization"] + "tests/vcr_cassettes/subscribers-get-email.yml", + filter_headers=["Authorization"], ) - def test_given_correct_params_when_calling_update_then_subscirber_is_returned( + def test_given_subscriber_email_calling_get_then_subscirber_is_returned( self, subscriber_keys ): response = self.client.subscribers.get(pytest.entity_email) @@ -177,6 +178,18 @@ def test_given_correct_params_when_calling_update_then_subscirber_is_returned( assert isinstance(response["data"], dict) assert set(subscriber_keys).issubset(response["data"].keys()) + @vcr.use_cassette( + "tests/vcr_cassettes/subscribers-get-id.yml", filter_headers=["Authorization"] + ) + def test_given_subscriber_id_calling_get_then_subscirber_is_returned( + self, subscriber_keys + ): + response = self.client.subscribers.get(pytest.entity_id) + + assert isinstance(response, dict) + assert isinstance(response["data"], dict) + assert set(subscriber_keys).issubset(response["data"].keys()) + @vcr.use_cassette( "tests/vcr_cassettes/subscribers-get-import.yml", filter_headers=["Authorization"], diff --git a/tests/vcr_cassettes/subscribers-assign-subscriber-to-group.yml b/tests/vcr_cassettes/subscribers-assign-subscriber-to-group.yml index 6f0cca5..9e089ab 100644 --- a/tests/vcr_cassettes/subscribers-assign-subscriber-to-group.yml +++ b/tests/vcr_cassettes/subscribers-assign-subscriber-to-group.yml @@ -20,19 +20,16 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA4SRwWpDIRBFf6XM2oSnSXnBVRdZ9RdKkYnaZqhPRcdCG/LvxSQvCYVS3Hiudxzv - eACHjKAPQA40jI9ytRmVHEY1qNV6I0GAn5ACaHgvqWX2lZ9OytKmCQRURm4VNKBl+vRdSa1Y35VM - HX1k0IOAlH2sxqZ2YRvIftwL3WAKsr8d35CyQeeKr72XXJ5Wv73tqi20884ggwY1KLWQaqHkg5Ja - rbXagIAWf/liC0GALR75n8rs/rKsRi0VCHgjH1ztI4w49dzPaR9BQMDK5iJtU5+MTVPG+HVt35OX - GxJf93mfop+hj/gK34ZMPsNRnP+kgn55FRCSRaYUZ2fK/eEU7wKnzBQNzfXHHwAAAP//AwBkjVox - /gEAAA== + H4sIAAAAAAAAA4SRzWpDIRCFX6XM2oT7lxviqouu+gqliFHbDPWq6FhoQ969TH7uDYVS3PgdjzPO + 8QhWkwZ5BLQgoe13210zjJtNMw7bbT82IMBNGj1IeM+xJnKFHs/K2sQJBBTSVAtI0Ibw07ESazaO + lYSMLhDIRkBMLhRlYr2y8Wg+7gU2qKzJLccLYlLa2uwK92rX58XV676YjHtnlSaQ0DXdsGq7VTM8 + tJ1sR9mOIKCGX75QvRdgstP0z81k/7J0g+w7EPCGztvCGQY98dzP8RBAgNeF1FV6ipyMiVPS4Wtu + z5PnBZHmfTrE4G7AEc/wrVClC5zE5U8KyJdXjo8fiuFuwJgIg8Kb//QDAAD//wMAHtxC3O8BAAA= headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c1f2fd3cc2dc-VIE + - 8ecbc6226b34e292-BEG Cache-Control: - no-cache, private Connection: @@ -42,24 +39,28 @@ interactions: Content-Type: - application/json Date: - - Wed, 21 Dec 2022 21:37:12 GMT + - Wed, 04 Dec 2024 12:24:32 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains Transfer-Encoding: - chunked - X-Locale: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '114' + x-ratelimit-remaining: + - '91' status: code: 200 message: OK - request: - body: '{"name": "qpOKjavwCm"}' + body: '{"name": "wXawFTLtMZ"}' headers: Accept: - application/json @@ -77,15 +78,13 @@ interactions: uri: https://connect.mailerlite.com/api/groups response: body: - string: '{"data":{"id":"75139522427356238","name":"qpOKjavwCm","active_count":0,"sent_count":0,"opens_count":0,"open_rate":{"float":0,"string":"0%"},"clicks_count":0,"click_rate":{"float":0,"string":"0%"},"unsubscribed_count":0,"unconfirmed_count":0,"bounced_count":0,"junk_count":0,"created_at":"2022-12-21 - 21:37:12"}}' + string: '{"data":{"id":"139790985718663045","name":"wXawFTLtMZ","active_count":0,"sent_count":0,"opens_count":0,"open_rate":{"float":0,"string":"0%"},"clicks_count":0,"click_rate":{"float":0,"string":"0%"},"unsubscribed_count":0,"unconfirmed_count":0,"bounced_count":0,"junk_count":0,"created_at":"2024-12-04 + 12:24:32"}}' headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c1f53bc578a0-VIE + - 8ecbc623dd97e28f-BEG Cache-Control: - no-cache, private Connection: @@ -93,19 +92,23 @@ interactions: Content-Type: - application/json Date: - - Wed, 21 Dec 2022 21:37:12 GMT + - Wed, 04 Dec 2024 12:24:32 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains Transfer-Encoding: - chunked - X-Locale: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '113' + x-ratelimit-remaining: + - '90' status: code: 201 message: Created @@ -125,21 +128,19 @@ interactions: User-Agent: - MailerLite-Python-SDK-Client method: POST - uri: https://connect.mailerlite.com/api/subscribers/75138721072023481/groups/75139522427356238 + uri: https://connect.mailerlite.com/api/subscribers/139790465506477360/groups/139790985718663045 response: body: string: !!binary | - H4sIAAAAAAAAA4SNsQ6CMBgGX8V8iRsk9EdEuzo6+AiklGoK8hdLq4Ph3Q3GAV0c75LLPdGooCCf - sA0kykLk+4JoQ2VebCnfIQGr3kDiNpyOrbo/Dj0SKB3s3VTaRQ6QWYLRcFigGwyPP1x5Fcx8Ol+d - +lTBW75AIltjSqCvVnfL7C3+d5HHWI/a29o0izqydny2vv+ytYusv0wbuVtOvVHBNNX8AmVEqaCU - xIqEzEspCNP0AgAA//8DADTNZcM2AQAA + H4sIAAAAAAAAA4SNvQrCMBwHX0V+4BYhTWu1eQAn3RzEpaRplKj9R/JhB+m7i+LQujjewXFPtCoq + yCdsC4ksr1YVr9bLVbYuy5wXSzCQ6gwk+oPqN/tt3B3BoHS0D1NrlyhCcoZgKI7Q3Q2FH669iua9 + Ot2c+lbRWzpDgs8xMOib1ddx9hH/u0QhNUF725h2VCfSjk7WdxPbuER6Yi6JruOpNyqatn6/ILgo + FplY8GKWCSkKmQsMwwsAAP//AwDgvJrVNwEAAA== headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c1f73e4bc293-VIE + - 8ecbc6250eb8e295-BEG Cache-Control: - no-cache, private Connection: @@ -149,19 +150,23 @@ interactions: Content-Type: - application/json Date: - - Wed, 21 Dec 2022 21:37:13 GMT + - Wed, 04 Dec 2024 12:24:33 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains Transfer-Encoding: - chunked - X-Locale: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '112' + x-ratelimit-remaining: + - '89' status: code: 200 message: OK @@ -181,33 +186,35 @@ interactions: User-Agent: - MailerLite-Python-SDK-Client method: DELETE - uri: https://connect.mailerlite.com/api/subscribers/75138721072023481 + uri: https://connect.mailerlite.com/api/subscribers/139790465506477360 response: body: string: '' headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c1f96d6c0d56-VIE + - 8ecbc6267d33e295-BEG Cache-Control: - no-cache, private Connection: - keep-alive Date: - - Wed, 21 Dec 2022 21:37:13 GMT + - Wed, 04 Dec 2024 12:24:33 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains - X-Locale: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '111' + x-ratelimit-remaining: + - '88' status: code: 204 message: No Content @@ -227,33 +234,35 @@ interactions: User-Agent: - MailerLite-Python-SDK-Client method: DELETE - uri: https://connect.mailerlite.com/api/groups/75139522427356238 + uri: https://connect.mailerlite.com/api/groups/139790985718663045 response: body: string: '' headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c1fb9ccac2b6-VIE + - 8ecbc6280da1b018-BEG Cache-Control: - no-cache, private Connection: - keep-alive Date: - - Wed, 21 Dec 2022 21:37:13 GMT + - Wed, 04 Dec 2024 12:24:33 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains - X-Locale: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '110' + x-ratelimit-remaining: + - '87' status: code: 204 message: No Content diff --git a/tests/vcr_cassettes/subscribers-count.yml b/tests/vcr_cassettes/subscribers-count.yml index 8dc8874..f69685a 100644 --- a/tests/vcr_cassettes/subscribers-count.yml +++ b/tests/vcr_cassettes/subscribers-count.yml @@ -17,14 +17,12 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA6pWKskvScxRsrKoBQAAAP//AwB6kwnECwAAAA== + H4sIAAAAAAAAA6pWKskvScxRsjKqBQAAAP//AwDwe+Y+CwAAAA== headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d935bb292cc2dc-VIE + - 8ecbc634bfd9e28f-BEG Cache-Control: - no-cache, private Connection: @@ -34,19 +32,23 @@ interactions: Content-Type: - application/json Date: - - Thu, 22 Dec 2022 13:30:03 GMT + - Wed, 04 Dec 2024 12:24:35 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains Transfer-Encoding: - chunked - X-Locale: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '119' + x-ratelimit-remaining: + - '78' status: code: 200 message: OK diff --git a/tests/vcr_cassettes/subscribers-create.yml b/tests/vcr_cassettes/subscribers-create.yml index b7bd8b8..8907523 100644 --- a/tests/vcr_cassettes/subscribers-create.yml +++ b/tests/vcr_cassettes/subscribers-create.yml @@ -20,19 +20,17 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA4SQwWoDIRCGXyXM2QR1d1nw1ENPfYVSxKhthroqOhbakHcvptkklELx4vf7z4z/ - HMEZMqCOgA4UzBPn8zxOwzSNYp6GARj4xWAABeQrTQ9n2tm0AINKhloFBcYSfviupFas70rGjj4S - KM4gZR+rtqld2Aa07/dCN+hiyN+eb4hZG+eKr32W2J1P79721Rbce6cNgQLJpdwKuZV8I7gapRo5 - MGjxly+2EBjY4g39U5ndHxaxkUINsxLd8oo+uNrXF83Scz+lQwQGwVTSF+kx9c3YtGQTP6/je/Jy - Q6TrPR9S9Cv0FV/hS6POP3Bi8FZSyxXU8wuDkKwhTHF1ptw/jvEucMqEUeNaf/oGAAD//wMAMCeT - WvoBAAA= + H4sIAAAAAAAAA4SRwU4DIRCGX8XMmW1gl62WkwdPvoIxhAK2xF0gMJho03c3U9ttY2IMF77hA4af + AziDBtQBggMFYtjcb7hcSzmOD1zKTQ8M/GzCBArQVxwfT7SyaQYGFQ22CgqMxfDhqZJasZ4qORD6 + iKA4g5R9rNqmdmY7Bft+WyBBF4P+unzFkLVxrvhKd4nVadDpbVttCVvvtEFQ0PNedqLvuLwTvRJr + JUZg0OIvL7ZpYmCLN/jPzuz+UnqpBmrhLZWdx8UYOy46PpwNPpAR/OQqJRzNTMk8p30EBpOpqM+l + p0TZ2TRnEz+XBimbcsWAyzzvU/QXoE9Y4EsHnX/gyGBXUssV1MsrBUxPCfEmgpQxRB0u/vEbAAD/ + /wMA1NfJng0CAAA= headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c1e9cb53c2b1-VIE + - 8ecbc61bea62e292-BEG Cache-Control: - no-cache, private Connection: @@ -42,19 +40,23 @@ interactions: Content-Type: - application/json Date: - - Wed, 21 Dec 2022 21:37:10 GMT + - Wed, 04 Dec 2024 12:24:31 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains Transfer-Encoding: - chunked - X-Locale: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '118' + x-ratelimit-remaining: + - '96' status: code: 200 message: OK diff --git a/tests/vcr_cassettes/subscribers-delete.yml b/tests/vcr_cassettes/subscribers-delete.yml index 1c14979..fd1c85d 100644 --- a/tests/vcr_cassettes/subscribers-delete.yml +++ b/tests/vcr_cassettes/subscribers-delete.yml @@ -15,33 +15,35 @@ interactions: User-Agent: - MailerLite-Python-SDK-Client method: DELETE - uri: https://connect.mailerlite.com/api/subscribers/75007745355417533 + uri: https://connect.mailerlite.com/api/subscribers/139790464455804492 response: body: string: '' headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c2046ec57876-VIE + - 8ecbc6323fe1e290-BEG Cache-Control: - no-cache, private Connection: - keep-alive Date: - - Wed, 21 Dec 2022 21:37:15 GMT + - Wed, 04 Dec 2024 12:24:35 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains - X-Locale: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '106' + x-ratelimit-remaining: + - '80' status: code: 204 message: No Content @@ -65,15 +67,13 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA6rmUlBQUFDKTS0uTkxPVbJSUPLLVygsTS2qVChKLS7NKSlWSMsvUsjNT0nNUYh2 - LCiIifEFsYtjYoJLk4qTizKTUouQ2bF6Sly1AAAAAP//AwCoGehYVgAAAA== + H4sIAAAAAAAAA6pWyk0tLk5MT1WyUgpKLc4vLUpOVcjLL1FIyy/NS9FTqgUAAAD//wMAZiyhmiEA + AAA= headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c206ae94c21e-VIE + - 8ecbc633bedde296-BEG Cache-Control: - no-cache, private Connection: @@ -83,17 +83,21 @@ interactions: Content-Type: - application/json Date: - - Wed, 21 Dec 2022 21:37:15 GMT + - Wed, 04 Dec 2024 12:24:35 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains Transfer-Encoding: - chunked - X-RateLimit-Limit: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '105' + x-ratelimit-remaining: + - '79' status: code: 404 message: Not Found diff --git a/tests/vcr_cassettes/subscribers-forget.yml b/tests/vcr_cassettes/subscribers-forget.yml index e491357..580171f 100644 --- a/tests/vcr_cassettes/subscribers-forget.yml +++ b/tests/vcr_cassettes/subscribers-forget.yml @@ -20,17 +20,19 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA4SRz2oDIRDGXyXM2Q2uu7LEUw899RVKEaO2GbqromOhDXn3Ypp/LYTixd98M87M - 5x6cIQNqD+hAwSQ5n6ZRDlKO/SSHARj4xeAMCsgXkg9HWtu4AINChmoBBcYSfvgWiTVb3yIJG/pA - oDiDmHwo2sZ6Yjujfb8NtASdDfmrfEVM2jiXfWm9+vXxtNfrttiMW++0IVAguBBdLzrBVz1Xo1Aj - BwY1/MkLdZ4Z2OwN/VOZ3K+UoeOyE+Oq3ygplNgAg1f0syvNvmCWtvdT3AVgMJtC+hR6jM0ZG5dk - wuelfds8XxHpck+7GPwZmsUX+NKo0xnad+itIbvTxyl0f1cRd5XhrjL+KAcGbznWVEA9vzCYozWE - MZzLYmoGYbgxNibCoPE05+HwDQAA//8DABEp4vdiAgAA + H4sIAAAAAAAAA4SRzU4DIRRGX8XcNdPADFMtKxeufAVjCAVsiTNA4GKiTd/d3NpOGxNjZsP5OMPP + xwGcQQPqAMGBAjFs7jdcrqUcxwcu5aYHBn42YQIF6CuOjyda2TQDg4oGWwUFxmL48JSkVqynJAdC + HxEUZ5Cyj1Xb1M5sp2DfbwMSdDHor9NXDFkb54qvtJdYnT5avW2rLWHrnTYICnrey070HZd3oldi + rcQIDFr85cU2TQxs8Qb/+TO7v5ReqoGUt1R2Hhdj7Ljo+HA2+EBG8JOr1HA0MzXznPYRGEymoj5H + T4m6s2nOJn4uB6RuyhUDLuO8T9FfgB5hgS8ddP6BI4NdSS1XUC+vVDBdJcSbClLGEHW4+MdvAAAA + //8DACYEBrANAgAA headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 7cc815e1ee47b903-AMS + - 8ecbc635ccc571a3-BEG + Cache-Control: + - no-cache, private Connection: - keep-alive Content-Encoding: @@ -38,25 +40,23 @@ interactions: Content-Type: - application/json Date: - - Wed, 24 May 2023 19:53:34 GMT + - Wed, 04 Dec 2024 12:24:35 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains Transfer-Encoding: - chunked - VIA: - - Ingress access-control-allow-origin: - '*' - cache-control: - - no-cache, private + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains x-locale: - en x-ratelimit-limit: - '120' x-ratelimit-remaining: - - '119' + - '77' status: code: 200 message: OK @@ -76,22 +76,24 @@ interactions: User-Agent: - MailerLite-Python-SDK-Client method: POST - uri: https://connect.mailerlite.com/api/subscribers/75007745355417533/forget + uri: https://connect.mailerlite.com/api/subscribers/139790464455804492/forget response: body: string: !!binary | - H4sIAAAAAAAAA4RSy24bIRT9FXTXjMXATK2y6qKrbruMKoTh1kZhAMGdRG6Uf69w/UolK2LDeVxm - OIc38JYs6DcIHjRsZyG222lW8zyN21kp4ICLDRE0EDaav53QxuUFODSytDbQYB2FF+xMXqvDzpTQ - ISYCLTjkgqkZl9czdjG453uiG0y1hDf5BkMx1vuKrX9r3JxWP33dNVfDDr2xBBqkkHIY5SAFG4We - pJ4EcFjTf760xsjBVbT0yWTxHyxqEPMgJzZ+1bPSagIOHiN+Yvmd6x7p3vFlkOqDI2D0rXeQ7NLD - +5EPCThE28icqe+5x+vyUmw6Xu/Q46s3GOi6L4ec8AJ6T1fwxwRTLqB3anaW3MGc/sKMDxX5UFEP - lemf8s5hX/NaGuinXxxidpZCTpexXHqEId21kwuFZEK5zi/Ymt33JH5e2qysP132GmJkO2Q9m15G - PLJzK8wmz3r8mQgTew10CIkpwbw9tg28/wUAAP//AwCHbe7y/AIAAA== + H4sIAAAAAAAAA4SST08DIRDFvwqZ826zf6vl5MGTV4/GbCiMLZEFArM2tel3N1PbbTUxhgvv8YDh + NxzAKFIgD2ANSKjb1d2q6pZd1/f3VdetGigAR2UdSCDM1D+c1EKHEQrIpGjKIEFpsh/ITpiSRnai + ZYmeQFYFhIg+DzpMZ62d1e+3BgeGpAivy1dp46CMSZj5rnpxGnz6tM462TWaQRFIaKqmK+umrDpR + N7JeyrqHAib/K+cn5wrQCRX9szOavyJNJ1uOGHT4T+QtpA3SnOjLqi6r9kfCojOZm+DVyPCewtZD + AU5lGs7WY2C8OoxR+f38BsaXrtLSPI/b4PEiuE+z+BzsEL/FsYBNClPMIF9euQf8FOtvKIVI1g/2 + mh8xZ7Xhip4vVJPgPyR21jmxRsE1MhS3F2c6QnkjGEMgQi92lrbWi7YSRu3zAo5fAAAA//8DADwW + Pr6FAgAA headers: CF-Cache-Status: - DYNAMIC CF-RAY: - - 7cc815e478acb772-AMS + - 8ecbc6376c03e294-BEG + Cache-Control: + - no-cache, private Connection: - keep-alive Content-Encoding: @@ -99,25 +101,23 @@ interactions: Content-Type: - application/json Date: - - Wed, 24 May 2023 19:53:34 GMT + - Wed, 04 Dec 2024 12:24:35 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains Transfer-Encoding: - chunked - VIA: - - Ingress access-control-allow-origin: - '*' - cache-control: - - no-cache, private + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains x-locale: - en x-ratelimit-limit: - '120' x-ratelimit-remaining: - - '118' + - '76' status: code: 200 message: OK diff --git a/tests/vcr_cassettes/subscribers-get.yml b/tests/vcr_cassettes/subscribers-get-email.yml similarity index 51% rename from tests/vcr_cassettes/subscribers-get.yml rename to tests/vcr_cassettes/subscribers-get-email.yml index f1972eb..893ecd7 100644 --- a/tests/vcr_cassettes/subscribers-get.yml +++ b/tests/vcr_cassettes/subscribers-get-email.yml @@ -17,18 +17,17 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA4SQ3WrEIBCFX2WZ6+yiJiHgVS/6Br0sRVy17dBERcdCu+y7l9mm2aUUijd+x+P8 - nBN4Sxb0CdCDhmkUYpqGsR/HQU5j30MHYbE4gwYKlca7Cx1cWqCDSpZaBQ3WEb4HVlIrLrCSkTFE - Ai06SDnEalxqK7sZ3dutwAZTLIXr8xUxG+t9CZV7ycPlcPV2rK7gMXhjCTQoodReqr0SOyn0oPQg - oIMWf/lim+cOXAmW/vmZ/R8WuVNS95OWbHnGMPvK8UW78N4PaQkpchSzrWRW9T6x4tKSbfzYJuDl - yxWRtnt+5RorcMobfBo0+RvOHbyU1HIF/fjECfKsGG92TJkwGvzxn78AAAD//wMAgbAGwe0BAAA= + H4sIAAAAAAAAA4SRwU7EIBCGX8XMud1AS1fLyYNv4NEYwgKuxBYIDCa62Xc3s9Z2Y2IMF76fn5nh + 5wRWowZ5Am9BAu/H25GJvRDDcMeEGDtowM3aTyABXcHh/kI7E2dooKDGWkCCNujfHSmxZuNISZ7Q + BQTJGojJhaJMrAubyZu3a4EMKmt02/GGPiltbXaFevHdZVH1eigm+4OzSiNI6FgnWt61TNzwTvK9 + 5AM0UMMvX6jT1IDJTuM/N5P9y9IJ2dMILzEfHa6OoWW8Zf3iYD05vJtsoYSDnimZxzi7GCisSRdU + i/oQSTFxTjp8rDNSPHlDj+s+vVKNBegfVvhUXqVvODdwzLGmAvLpmTKm1/hwlUJM6IPyP/7zFwAA + AP//AwDI2TEIEAIAAA== headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c1ef3981c2c0-VIE + - 8ecbc61ee9b4e297-BEG Cache-Control: - no-cache, private Connection: @@ -38,19 +37,23 @@ interactions: Content-Type: - application/json Date: - - Wed, 21 Dec 2022 21:37:11 GMT + - Wed, 04 Dec 2024 12:24:31 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains Transfer-Encoding: - chunked - X-Locale: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '116' + x-ratelimit-remaining: + - '94' status: code: 200 message: OK diff --git a/tests/vcr_cassettes/subscribers-get-id.yml b/tests/vcr_cassettes/subscribers-get-id.yml new file mode 100644 index 0000000..c23a264 --- /dev/null +++ b/tests/vcr_cassettes/subscribers-get-id.yml @@ -0,0 +1,60 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - MailerLite-Python-SDK-Client + method: GET + uri: https://connect.mailerlite.com/api/subscribers/139790464455804492 + response: + body: + string: !!binary | + H4sIAAAAAAAAA4SRwU7EIBCGX8XMud1AS1fLyYNv4NEYwgKuxBYIDCa62Xc3s9Z2Y2IMF76fn5nh + 5wRWowZ5Am9BAu/H25GJvRDDcMeEGDtowM3aTyABXcHh/kI7E2dooKDGWkCCNujfHSmxZuNISZ7Q + BQTJGojJhaJMrAubyZu3a4EMKmt02/GGPiltbXaFevHdZVH1eigm+4OzSiNI6FgnWt61TNzwTvK9 + 5AM0UMMvX6jT1IDJTuM/N5P9y9IJ2dMILzEfHa6OoWW8Zf3iYD05vJtsoYSDnimZxzi7GCisSRdU + i/oQSTFxTjp8rDNSPHlDj+s+vVKNBegfVvhUXqVvODdwzLGmAvLpmTKm1/hwlUJM6IPyP/7zFwAA + AP//AwDI2TEIEAIAAA== + headers: + CF-Cache-Status: + - DYNAMIC + CF-RAY: + - 8ecbc6201cebe298-BEG + Cache-Control: + - no-cache, private + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 04 Dec 2024 12:24:32 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: + - en + x-ratelimit-limit: + - '120' + x-ratelimit-remaining: + - '93' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/vcr_cassettes/subscribers-get-import.yml b/tests/vcr_cassettes/subscribers-get-import.yml index 4860702..bad5cac 100644 --- a/tests/vcr_cassettes/subscribers-get-import.yml +++ b/tests/vcr_cassettes/subscribers-get-import.yml @@ -17,19 +17,13 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA4xRy27DIBD8lz2TCNZO7XDqR/TUKrIwkAbJBgS4UhX53yv8SKh6KSdmdkYzC3dQ - IgngdzAKODQnhk3btgxfaoZ1XQGB5JIYgCMBH5zUMWq1IDN6F1IGlMDkldjvOgQXNpHXQWqbgDNK - CShnNfAUJk3A2C8x5NCPywN00k1ZTAmMJqZvr7f5jgqBvAn7uc83UIwn+xQ8lqP03NK2apqKNbRB - IKBHYQbgcDUhptcFHaUbYSZ/TOea1YinwhS1dFaVrksRvJfBzMWpjzKYfi9cMkXr4Abd9SLusicu - RL2wVqtuff9uSY/l5utXdCIBB6SIB4YHZG+s5RVypEe6nHfILfKPLEo7DQOBmJz3m3dlsqSLSYT0 - i74aa+LtPynz/AMAAP//AwAz/IsxZAIAAA== + H4sIAAAAAAAAA6pWyk0tLk5MT1WyUgpKLc4vLUpOVcjLL1FIyy/NS9FTqgUAAAD//wMAZiyhmiEA + AAA= headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c1f13e18c2f7-VIE + - 8ecbc6213d25e291-BEG Cache-Control: - no-cache, private Connection: @@ -39,20 +33,22 @@ interactions: Content-Type: - application/json Date: - - Wed, 21 Dec 2022 21:37:12 GMT + - Wed, 04 Dec 2024 12:24:32 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains Transfer-Encoding: - chunked - X-Locale: - - en - X-RateLimit-Limit: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '115' + x-ratelimit-remaining: + - '92' status: - code: 200 - message: OK + code: 404 + message: Not Found version: 1 diff --git a/tests/vcr_cassettes/subscribers-list.yml b/tests/vcr_cassettes/subscribers-list.yml index fad569f..5407373 100644 --- a/tests/vcr_cassettes/subscribers-list.yml +++ b/tests/vcr_cassettes/subscribers-list.yml @@ -17,26 +17,19 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA+zXSY+bMBQA4L8SvTOTeANjn3Lorccemwo5xjOxAgYZM12i/PeKLIRkklnSbSJV - iiJsvWcbf9jgFeQqKJCfV2BzkMBjRFFCk4RhgXHKKERgSmULkGAfKj9deG2WY99ABE1QoW1AgtLB - Ppqupmq9NiDhq5nfV77sqowLIHEEVW1ck+mq3ZV1YfWyr0DbgMyrYEBihHYBuwoUga0zlefeNF2P - qRgTnIwJH2PGu17aeaO9nZs8UwEkEETIHSZ3BI1wIlkiKYYIWncS59qiiEB7o8ILmXV+JgSPEJcs - ljGCCO6tKfIG5AqcKs2+7UI1IRtW6Kqslft+KLYu+EPRhv66XlSuT+vmui/8yGxWbwvrbt66kVl3 - YfyMwCbGuszWT6ZuHQ3h45SLlHKBiRjCz4vWTL2az204kW+drty99aXJn+NHJ/zoef7fix9Lxq7D - 32eexd/PL8bvBn8bcLDexgyBCUYpTUnCOUED4Hu7bJvp5n+sq/LGhKmQLL5KuM+8LNyFiJsRRiJF - 3QJmmBESD4QboyuXTzfFU+Kn27ct68qHP4O7u+FnRLHEsST8CtFB5oUNG6eSEknez4b9SlFOMUec - HK1Z34T/oLcHGnOMYipwQhEegjZVaehrQVVt/5Umkt1PXKE5yLy04R5CbkGTIUQRpjROU8YTcap5 - HnNetU4fv02HmvjvaSIxQpvlE9M3ap5kntPEolu+KJbxrXwgUUEx4ZxxJlKRHm22Tb6cdpfGFzaY - l5dnqVyrit6UnJiSXzv+vKCajjDtbBh6q+px5qU1mnZfxoieUYVPHz7CO2H9EkFh3XIzus27cvjQ - 9d1587i/duZb6NsvTXcqXkGtwgIkLEKoGzmbzCa6cs7oMD5+GmYTVdvZpJ/qzSmpNj6r1cMGdNt8 - plvfVH7Y+1HVev0TAAD//wMA61a/U5APAAA= + H4sIAAAAAAAAA8xTy44bIRD8FavP2IbxjD3DKYdc8g1xhFiGtVtmAPFYJbH87xGeCbteRUqU0966 + imr6UXCFUSYJ/OsVcAQOjB72LesGdmi6ng39bgACepJogAOeXPh0DkpfNiECgZhkyhE4SJXwRRfG + 5aA0cJikzdIURtsEvCHgvLZRKJcXrAyqSyXoLBBBJg2cUboIFoISQC/kOAYdI3CbjSEQ81NUAZ/0 + KGQCDg1tdmvWrFm3Yh1vd7xlQCDbd7o5WQUt018y/fggaYuEtivGeNfytgcCz6jNGIFfwcqpzP05 + 5BOuvpxcAAJGxiTmg6Wom7y0P15htim8Qkw19mdna1rZcwU/BQo/g1tZWukQ7ZvJnE9oBVbN4mzX + H2hH24H1Ax1ot6fvjS2xDgaT3ig3fUh7mzXdr5vd3YGes8O/2/unzP+w9yMZ+42AQXu5t/eMIVZd + 6a6WC/rld2z191Tvn3T59lfwMp2BwzklH/lxe9wqZ61WafP4HI5b6fG4rbu+/3+vg/DydHd0vl6o + HKILb6s/ULfbLwAAAP//AwCwepyycQQAAA== headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c1e7cde6c30f-VIE + - 8ecbc61aac8fe291-BEG Cache-Control: - no-cache, private Connection: @@ -46,19 +39,23 @@ interactions: Content-Type: - application/json Date: - - Wed, 21 Dec 2022 21:37:10 GMT + - Wed, 04 Dec 2024 12:24:31 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains Transfer-Encoding: - chunked - X-Locale: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '119' + x-ratelimit-remaining: + - '97' status: code: 200 message: OK diff --git a/tests/vcr_cassettes/subscribers-unassign-subscriber-from-group.yml b/tests/vcr_cassettes/subscribers-unassign-subscriber-from-group.yml index ed70d3e..d73932a 100644 --- a/tests/vcr_cassettes/subscribers-unassign-subscriber-from-group.yml +++ b/tests/vcr_cassettes/subscribers-unassign-subscriber-from-group.yml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"email": "CSKovNFMPg@email.com", "fields": {"name": "John", "last_name": + body: '{"email": "NtaEvodtKa@email.com", "fields": {"name": "John", "last_name": "Doe"}, "ip_address": "1.1.1.1"}' headers: Accept: @@ -19,16 +19,14 @@ interactions: uri: https://connect.mailerlite.com/api/subscribers response: body: - string: '{"data":{"id":"75139523821962654","email":"cskovnfmpg@email.com","status":"active","source":"api","sent":0,"opens_count":0,"clicks_count":0,"open_rate":0,"click_rate":0,"ip_address":"1.1.1.1","subscribed_at":"2022-12-21 - 21:37:14","unsubscribed_at":null,"created_at":"2022-12-21 21:37:14","updated_at":"2022-12-21 - 21:37:14","fields":{"name":"John","last_name":"Doe","company":null,"country":null,"city":null,"phone":null,"state":null,"z_i_p":null},"groups":[],"location":null,"opted_in_at":null,"optin_ip":null}}' + string: '{"data":{"id":"139790986760947276","email":"ntaevodtka@email.com","status":"active","source":"api","sent":0,"opens_count":0,"clicks_count":0,"open_rate":0,"click_rate":0,"ip_address":"1.1.1.1","subscribed_at":"2024-12-04 + 12:24:33","unsubscribed_at":null,"created_at":"2024-12-04 12:24:33","updated_at":"2024-12-04 + 12:24:33","fields":{"name":"John","last_name":"Doe","company":null,"country":null,"city":null,"phone":null,"state":null,"z_i_p":null},"groups":[],"opted_in_at":null,"optin_ip":null}}' headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c1fd9ef3c214-VIE + - 8ecbc629ea77e293-BEG Cache-Control: - no-cache, private Connection: @@ -36,22 +34,28 @@ interactions: Content-Type: - application/json Date: - - Wed, 21 Dec 2022 21:37:14 GMT + - Wed, 04 Dec 2024 12:24:33 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains - X-Locale: + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '109' + x-ratelimit-remaining: + - '86' status: code: 201 message: Created - request: - body: '{"name": "CSKovNFMPg"}' + body: '{"name": "NtaEvodtKa"}' headers: Accept: - application/json @@ -69,15 +73,13 @@ interactions: uri: https://connect.mailerlite.com/api/groups response: body: - string: '{"data":{"id":"75139524251878936","name":"CSKovNFMPg","active_count":0,"sent_count":0,"opens_count":0,"open_rate":{"float":0,"string":"0%"},"clicks_count":0,"click_rate":{"float":0,"string":"0%"},"unsubscribed_count":0,"unconfirmed_count":0,"bounced_count":0,"junk_count":0,"created_at":"2022-12-21 - 21:37:14"}}' + string: '{"data":{"id":"139790987036722835","name":"NtaEvodtKa","active_count":0,"sent_count":0,"opens_count":0,"open_rate":{"float":0,"string":"0%"},"clicks_count":0,"click_rate":{"float":0,"string":"0%"},"unsubscribed_count":0,"unconfirmed_count":0,"bounced_count":0,"junk_count":0,"created_at":"2024-12-04 + 12:24:34"}}' headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c200593ec316-VIE + - 8ecbc62bcb6fb018-BEG Cache-Control: - no-cache, private Connection: @@ -85,17 +87,23 @@ interactions: Content-Type: - application/json Date: - - Wed, 21 Dec 2022 21:37:14 GMT + - Wed, 04 Dec 2024 12:24:34 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains - X-Locale: + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '108' + x-ratelimit-remaining: + - '85' status: code: 201 message: Created @@ -115,21 +123,19 @@ interactions: User-Agent: - MailerLite-Python-SDK-Client method: POST - uri: https://connect.mailerlite.com/api/subscribers/75139523821962654/groups/75139524251878936 + uri: https://connect.mailerlite.com/api/subscribers/139790986760947276/groups/139790987036722835 response: body: string: !!binary | - H4sIAAAAAAAAA4SNQQuCMBxHv0r8oJuCm5m1a9AliqAPIHNOWdp/MTcv4ncPo4N16fgePN6ISnoJ - McJUEMgzlu4zvuEZ2+W7fbpFBJIPDYHD7WSHy/F8bRBBKm8GXSgbyEMkEXpNfoH2qan/4cJJr+dT - 3Vn5qbwz1EAgWWOKoDqj2mX2Fv+7QH0oe+VMqatFHUhZqo17fNnSBlJf5h6oXU6dll5XxfwCTziP - GY85W3Em0lywDabpBQAA//8DALKnLl82AQAA + H4sIAAAAAAAAA4SNQQrCMBQFryIP3FVI02pt9q4Er1B+kyhR+yPpjxvp3UVxUd24nIFhHnAkBPNA + cDAoq7ZpVbttVLVptN5WaxRgGjwMDkK7e3SyJxQgK+HuOxszC4wqMHqWGcab5/GHu0TiX6vjNdKn + khT4BAO1xFTAXoO9zLO3+N9lHnM/2hR672Z1Zhv5GNLwZfuY2X6Zc+bLfJo8iXfd6wWtdL0q9UrV + i1IbXZuqxjQ9AQAA//8DAHcwdu83AQAA headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c2020a2877e9-VIE + - 8ecbc62ced86e291-BEG Cache-Control: - no-cache, private Connection: @@ -139,17 +145,23 @@ interactions: Content-Type: - application/json Date: - - Wed, 21 Dec 2022 21:37:14 GMT + - Wed, 04 Dec 2024 12:24:34 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains - X-Locale: + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '107' + x-ratelimit-remaining: + - '84' status: code: 200 message: OK @@ -169,33 +181,35 @@ interactions: User-Agent: - MailerLite-Python-SDK-Client method: DELETE - uri: https://connect.mailerlite.com/api/subscribers/75139523821962654/groups/75139524251878936 + uri: https://connect.mailerlite.com/api/subscribers/139790986760947276/groups/139790987036722835 response: body: string: '' headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c26f3c177887-VIE + - 8ecbc62e4ebbe295-BEG Cache-Control: - no-cache, private Connection: - keep-alive Date: - - Wed, 21 Dec 2022 21:37:32 GMT + - Wed, 04 Dec 2024 12:24:34 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains - X-Locale: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '104' + x-ratelimit-remaining: + - '83' status: code: 204 message: No Content @@ -215,33 +229,35 @@ interactions: User-Agent: - MailerLite-Python-SDK-Client method: DELETE - uri: https://connect.mailerlite.com/api/subscribers/75139523821962654 + uri: https://connect.mailerlite.com/api/subscribers/139790986760947276 response: body: string: '' headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c2711dfac22b-VIE + - 8ecbc62f6a80e28f-BEG Cache-Control: - no-cache, private Connection: - keep-alive Date: - - Wed, 21 Dec 2022 21:37:32 GMT + - Wed, 04 Dec 2024 12:24:34 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains - X-Locale: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '103' + x-ratelimit-remaining: + - '82' status: code: 204 message: No Content @@ -261,33 +277,35 @@ interactions: User-Agent: - MailerLite-Python-SDK-Client method: DELETE - uri: https://connect.mailerlite.com/api/groups/75139524251878936 + uri: https://connect.mailerlite.com/api/groups/139790987036722835 response: body: string: '' headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c2730e9dc2dc-VIE + - 8ecbc630bd98e293-BEG Cache-Control: - no-cache, private Connection: - keep-alive Date: - - Wed, 21 Dec 2022 21:37:32 GMT + - Wed, 04 Dec 2024 12:24:34 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains - X-Locale: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '102' + x-ratelimit-remaining: + - '81' status: code: 204 message: No Content diff --git a/tests/vcr_cassettes/subscribers-update.yml b/tests/vcr_cassettes/subscribers-update.yml index 8ba0db7..9303d22 100644 --- a/tests/vcr_cassettes/subscribers-update.yml +++ b/tests/vcr_cassettes/subscribers-update.yml @@ -20,19 +20,17 @@ interactions: response: body: string: !!binary | - H4sIAAAAAAAAA4SQTWoEIRCFrxJq7Qy23U2DqyxygyxDEEdNUsRW0TKQDHP3UJP5IwSCG7/nq7Je - 7cFbsqD3gB40LLOUyzLN4zxPwzKPIwgIq8UIGig0mu+PtHV5BQGNLPUGGqwj/Ais5F5dYKUgY0gE - WgrIJaRmXO4ndhHd+63ABlMthevzFbEY630Njf8atsfD3fuuuYq74I0l0KCkUptBbZS8G6SelJ4k - COjply/1GAW4Giz9U1n8H5bhTg16XPTAlhcM0TdeX7Ir537Ma8iJVxFtI3NSHzIrLq/Fps/LBBy+ - XhHpci9v3OMEvOULfBk05QcOAl5r7qWBfnoWELOzhDmdnbnw7JhuMudCmAye6w/fAAAA//8DADSA - EIH9AQAA + H4sIAAAAAAAAA4SRwU7EIBCGX8XMud1AS1fLyYNv4NEYwgKuxBYIDCa62Xc3s9Z2Y2IMF76fn5nh + 5wRWowZ5Am9BAu/H25GJvRDDcMeEGDtowM3aTyABXcHh/kI7E2dooKDGWkCCNujfHSmxZuNISZ7Q + BQTJGojJhaJMrAubyZu3a4EMKmt02/GGPiltbXaFevHdZVH1eigm+4OzSiNI6FgnWt61TNzwTvK9 + 5AM0UMMvX6jT1IDJTuM/N5P9y9IJ2dMILzEfHa6OoWW8Zf3iYD05vJtsoYSDnimZxzi7GCisSRdU + i/oQSTFxTjp8rDNSPHlDj+s+vVKNBegfVvhUXqVvODdwzLGmAvLpmTKm1/hwlUJM6IPyP/7zFwAA + AP//AwDI2TEIEAIAAA== headers: - Access-Control-Allow-Origin: - - '*' CF-Cache-Status: - DYNAMIC CF-RAY: - - 77d3c1ec9f9d7899-VIE + - 8ecbc61d7d17e290-BEG Cache-Control: - no-cache, private Connection: @@ -42,19 +40,23 @@ interactions: Content-Type: - application/json Date: - - Wed, 21 Dec 2022 21:37:11 GMT + - Wed, 04 Dec 2024 12:24:31 GMT Server: - cloudflare - Strict-Transport-Security: - - max-age=15724800; includeSubDomains Transfer-Encoding: - chunked - X-Locale: + access-control-allow-origin: + - '*' + alt-svc: + - h3=":443"; ma=86400 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-locale: - en - X-RateLimit-Limit: + x-ratelimit-limit: - '120' - X-RateLimit-Remaining: - - '117' + x-ratelimit-remaining: + - '95' status: code: 200 message: OK