Skip to content

feat: ✨ Retrieve articles by date for Pakistan - #1

Open
Aisha630 wants to merge 1 commit into
abdulalikhan:mainfrom
Aisha630:main
Open

feat: ✨ Retrieve articles by date for Pakistan#1
Aisha630 wants to merge 1 commit into
abdulalikhan:mainfrom
Aisha630:main

Conversation

@Aisha630

@Aisha630 Aisha630 commented Apr 3, 2025

Copy link
Copy Markdown

Feature: Fetch Articles by Date Endpoint

This PR introduces a new endpoint to fetch news articles published on a specific date in Pakistan from Dawn.com. The route is structured as:

GET /api/v1/date/:date

Functionality

  • Accepts a date parameter in YYYY-MM-DD format.
  • Scrapes the Pakistan section on Dawn.com for articles published on that date.
  • Returns a structured JSON response including:
    • headline
    • URL
    • publish time
    • excerpt

Swagger Documentation

  • Updated Swagger annotations to include the new endpoint.
    This pull request includes several updates and improvements to the Dawn News API project. The changes include adding a new endpoint to fetch news articles by date, improving error handling, updating the Swagger documentation, and upgrading dependencies.

Testing & Linting

  • Improved error handling and updated dependencies
  • Manually tested the new endpoint through Swagger UI and confirmed correct responses.
  • Ensured the implementation adheres to existing project patterns.
  • Ran the following tools to ensure code quality and correctness:
    • golangci-lint
    • go vet

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.

1 participant