{"id":23150750,"url":"https://github.com/xonoxc/goapi","last_synced_at":"2025-07-22T18:34:55.897Z","repository":{"id":206036608,"uuid":"715652930","full_name":"xonoxc/goapi","owner":"xonoxc","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-07T15:11:55.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T14:44:50.834Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xonoxc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-07T15:09:11.000Z","updated_at":"2023-11-07T15:11:59.000Z","dependencies_parsed_at":"2023-11-07T16:49:36.834Z","dependency_job_id":"1fcb1308-ffd1-4bc4-afe6-ce20ef871cda","html_url":"https://github.com/xonoxc/goapi","commit_stats":null,"previous_names":["darkxxdevs/goapi","xonoxc/goapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xonoxc/goapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xonoxc%2Fgoapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xonoxc%2Fgoapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xonoxc%2Fgoapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xonoxc%2Fgoapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xonoxc","download_url":"https://codeload.github.com/xonoxc/goapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xonoxc%2Fgoapi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266552738,"owners_count":23947183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-17T18:18:23.577Z","updated_at":"2025-07-22T18:34:55.873Z","avatar_url":"https://github.com/xonoxc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API - GOlANG\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"./goimg/go.png\" alt=\"Go Logo\"\u003e\n\u003c/p\u003e\n\nWelcome to the API developed by darkxxdevs . This package provides a simple API for managing and retrieving information about courses. It is built using Go and the Gorilla Mux router.\n\n## Getting Started\n\nBefore you begin, make sure you have Go installed on your system.\n\n1. Clone this repository.\n2. Install the required dependencies by running:\n\n   ```sh\n   go get -u github.com/gorilla/mux\n\n   ```\n\n3. Build and run api\n\n   ```\n   go run main.go\n\n   ```\n\n- api will be available at [http://localhost:8080](http://localhost:8080).\n\n## API Endpoints\n\n### Home\n\n- **GET** `/`\n  - Description: Displays a welcome message.\n  - Example: [http://localhost:8080](http://localhost:8080)\n\n### Get All Courses\n\n- **GET** `/courses`\n  - Description: Retrieve a list of all courses.\n  - Example: [http://localhost:8080/courses](http://localhost:8080/courses)\n\n### Get One Course\n\n- **GET** `/courses/{courseid}`\n  - Description: Retrieve a single course by its ID.\n  - Example: [http://localhost:8080/courses/1](http://localhost:8080/courses/1)\n\n### Create One Course\n\n- **POST** `/courses/post`\n  - Description: Create a new course.\n  - Example: [POST Request with JSON Data](#sample-post-request)\n\n### Update One Course\n\n- **PUT** `/courses/update/{courseid}`\n  - Description: Update an existing course.\n  - Example: [PUT Request with JSON Data](#sample-put-request)\n\n### Delete One Course\n\n- **DELETE** `/courses/delete/{courseid}`\n  - Description: Delete a course by its ID.\n  - Example: [DELETE Request](#sample-delete-request)\n\n### Delete All Courses\n\n- **DELETE** `/courses/deleteall`\n  - Description: Delete all courses.\n  - Example: [DELETE Request](#sample-delete-all-request)\n\n## Sample POST Request\n\nTo create a new course, you can send a POST request with the following JSON data:\n\n```json\n{\n  \"courseid\": \"2\",\n  \"name\": \"New Course\",\n  \"price\": \"2000\",\n  \"author\": {\n    \"author_name\": \"John Doe\",\n    \"auhtor_websitr\": \"https://example.com\"\n  }\n}\n```\n\n## Sample GET Request\n\nTo retrieve a single course by its ID, send a GET request to the following endpoint with the appropriate `courseid` in the URL.\n\nExample: Retrieve a course with `courseid` equal to 1\n\n```http\nGET /courses/1\n```\n\n## Sample PUT Request\n\nTo update an existing course, send a PUT request with the updated JSON data for the course, including the `courseid` of the course you want to update.\n\nExample JSON data for updating a course:\n\n```json\n{\n  \"courseid\": \"2\",\n  \"name\": \"Updated Course\",\n  \"price\": \"2500\",\n  \"author\": {\n    \"author_name\": \"Jane Smith\",\n    \"auhtor_websitr\": \"https://updated-example.com\"\n  }\n}\n```\n\nMake sure to include the courseid in the URL to specify which course to update, such as /courses/update/2.\n\n## Sample DELETE Request\n\nTo delete a specific course by its ID, send a DELETE request to the following endpoint with the appropriate `courseid` in the URL.\n\nExample: Delete a course with `courseid` equal to 1\n\n```http\nDELETE /courses/delete/1\n```\n\nThe API will remove the specified course, and the response will indicate the success of the operation.\n\n## Sample DELETE All Request\n\nTo delete all courses, send a DELETE request to the following endpoint.\n\nExample: Delete all courses\n\n```http\nDELETE /courses/deleteall\n```\n\n## Developers\n\n- **Developer Name**: [Arpit Yadav]\n- **GitHub Profile**: [GitHub Profile](https://github.com/darkxxdevs)\n\nFeel free to connect with the developer and contribute to this project. If you have any questions or need assistance, please reach out to the developer for support.\n\nThank you for using this API package!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxonoxc%2Fgoapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxonoxc%2Fgoapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxonoxc%2Fgoapi/lists"}