Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Fetch All Subscribers to Newsletter (Paginated) #442

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

Qazim-tec
Copy link

@Qazim-tec Qazim-tec commented Mar 2, 2025

🚀 [FEAT] Fetch All Subscribers to Newsletter (Paginated)

📝 Description

Closes #411

This PR implements an endpoint to retrieve all active newsletter subscribers. The endpoint supports pagination, allowing clients to specify the page number and limit per request.


✅ Changes Proposed

  • Added GET /api/v1/pages/newsletter/subscribers endpoint.
  • Implemented pagination with configurable page size.
  • Ensured proper response formatting and status codes.
  • Added unit tests for pagination and response validation.

📌 Requirements

Endpoint Details:

  • Method: GET
  • URL: /api/v1/pages/newsletter/subscribers
  • Headers:
    • Content-Type: application/json

Query Parameters

Parameter Type Required Default Description
page Integer ❌ No 1 The page number to retrieve.
limit Integer ❌ No 10 The number of subscribers per page.

✅ Check List

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR are clear and explain the approach.
  • I am making a pull request against the dev branch (left side).
  • My commit messages follow the requested structure.
  • My code additions will not fail linting checks or unit tests.
  • I am only making changes to files I was requested to modify.

🔹 Responses

Successful Response (Status 200)

SuccessResponse

❌ Error Response (No Subscribers Found)

NosubscriberFound

❌ Error Response (Invalid Pagination Parameters)

PaginationError

🧪 Unit Tests

testUnit

@Qazim-tec Qazim-tec changed the title [FEAT] Fetch All Subscribers to Newsletter (Paginated) #411 [FEAT] Fetch All Subscribers to Newsletter (Paginated) Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] Fetch All Subscribers to Newsletter (Paginated)
1 participant