https://github.com/clifftech123/hng-backend-task-one
Repository contains a solution for an HNG Backend task one
https://github.com/clifftech123/hng-backend-task-one
Last synced: 7 months ago
JSON representation
Repository contains a solution for an HNG Backend task one
- Host: GitHub
- URL: https://github.com/clifftech123/hng-backend-task-one
- Owner: Clifftech123
- Created: 2023-09-07T04:50:45.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-07T13:29:50.000Z (almost 3 years ago)
- Last Synced: 2024-12-27T05:25:15.153Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 78.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Internship Task - API Endpoint
This repository contains a solution for an HNG Backend task one. The objective of the task was to create and host an API endpoint that takes two GET request query parameters: `slack_name` and `track`. The API should return specific information in JSON format, including Slack name, current day of the week, current UTC time, track, GitHub file URL, GitHub repo URL, and a success status code.
I successfully created the API, adhered to the specified JSON format, and ensured that it meets the acceptance criteria. The is solution is hosted at [Here ](https://hngtask1-advg.onrender.com//api?slack_name=Samuel&track=backend), and the code can be found in this repository.
## Task Details
https://hngtask1-advg.onrender.com//api?slack_name=IsaiahCliffordOpoku&track=backend
- **Objective:** Create and host an API endpoint.
- **Requirements:** Accept two GET request query parameters and return specific JSON data.
- **Acceptance Criteria:** Ensure endpoint creation, correct response format, and adherence to task requirements.
## Solution
We need to get some out put like
```json
{
"slack_name": "example_name",
"current_day": "Thursday",
"utc_time": "2023-09-07T10:03:00.504Z",
"track": "backend",
"github_file_url": "https://github.com/username/repo/blob/main/file_name.ext",
"github_repo_url": "https://github.com/username/repo",
"status_code": 200
}
```