Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/50-course/hngx
https://github.com/50-course/hngx
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/50-course/hngx
- Owner: 50-Course
- Created: 2023-09-07T12:30:34.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-11T07:41:15.000Z (about 1 year ago)
- Last Synced: 2024-05-01T13:17:24.075Z (6 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![image](https://github.com/50-Course/hngx/assets/72922139/65a928fb-53e4-4d03-9746-30450935b4a6)
## Objective
Create and host an endpoint using any programming language of your choice.
The endpoint should take two GET request query parameters and return specific information in JSON format.## Requirements
The information required includes:
* Slack name
* Current day of the week
* Current UTC time (with validation of +/-2)
* Track
* The GitHub URL of the file being run
* The GitHub URL of the full source code.
* A Status Code of Success## JSON
```
{
"slack_name": "example_name",
"current_day": "Monday",
"utc_time": "2023-08-21T15:04:05Z",
"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
}
```## Acceptance Criteria
* Endpoint Creation: Provide a publicly accessible endpoint.
* GET Parameters: The endpoint should accept two GET request query parameters: slack_name and track.
E.g.: http://example.com/api?slack_name=example_name&track=backend.
* Slack Name: The response should include the slack_name passed as a GET request query parameter.
* Current Day of the Week: Display the current day of the week in full (e.g., Monday, Tuesday, etc.).
* Current UTC Time: Return the current UTC time, accurate within a +/-2 minute window.
* Track: The response should display the track of the you signed up for (Backend). This will be based on the track GET parameter passed to the endpoint.
* GitHub File URL: Include a direct link to the specific file in the GitHub repository that's being executed.
* GitHub Repo URL: Include a link to the main page of the GitHub repository containing the project's entire source code.
* Status Code: Return 200 as Integer.
* JSON Format: The endpoint's response should adhere to the specified JSON format.## Testing: Before submission:
* Ensure the endpoint is accessible.
* Check the returned JSON against the defined format.
* Validate the correctness of each data point in the JSON response.