{"id":21418635,"url":"https://github.com/kdesp73/gotalk","last_synced_at":"2025-08-24T01:11:47.381Z","repository":{"id":254739340,"uuid":"846799311","full_name":"KDesp73/gotalk","owner":"KDesp73","description":"A REST API written in Go for handling comments, threads and users","archived":false,"fork":false,"pushed_at":"2025-06-23T20:06:32.000Z","size":4046,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-23T21:25:01.328Z","etag":null,"topics":["api","comments","comments-manager","golang","http","rest-api"],"latest_commit_sha":null,"homepage":"","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/KDesp73.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-24T01:54:33.000Z","updated_at":"2025-06-23T20:06:36.000Z","dependencies_parsed_at":"2024-11-22T21:57:41.750Z","dependency_job_id":null,"html_url":"https://github.com/KDesp73/gotalk","commit_stats":null,"previous_names":["kdesp73/gotalk"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/KDesp73/gotalk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KDesp73%2Fgotalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KDesp73%2Fgotalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KDesp73%2Fgotalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KDesp73%2Fgotalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KDesp73","download_url":"https://codeload.github.com/KDesp73/gotalk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KDesp73%2Fgotalk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271778236,"owners_count":24819265,"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-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["api","comments","comments-manager","golang","http","rest-api"],"created_at":"2024-11-22T19:23:01.254Z","updated_at":"2025-08-24T01:11:47.344Z","avatar_url":"https://github.com/KDesp73.png","language":"Go","readme":"# Gotalk API\n\n## Overview\n\nThe Gotalk API provides a general endpoint for handling comments, making it suitable for both dynamic and static websites. This API allows users to register, post comments, manage threads, and administer user privileges.\n\n## Version\n\n- **API Version**: 0.0.2\n\n## Specification\n\n[api-spec.yml](https://github.com/KDesp73/gotalk/blob/main/api/api-spec.yml)\n\n## Base URL\n\nThe base URL for the API is `/v1`.\n\n## Subroutes\n\nEndpoints that require registration are under the `/auth` path\n\nEndpoints that require admin privileges are under the `/admin` path\n\n## Endpoints\n\n### 1. Ping the Server\n\n- **GET** `/ping`\n  - **Summary**: Ping the server to check its status.\n  - **Responses**:\n    - `200`: Returns \"pong\".\n\n### 2. User Management\n\n#### Register a New User\n\n- **POST** `/user/new`\n  - **Summary**: Register a new user.\n  - **Parameters**:\n    - `name` (query, required): The name of the user.\n    - `email` (query, required): The email of the user.\n  - **Responses**:\n    - `201`: Registration complete.\n    - `400`: `\u003cfield\u003e not set`.\n    - `409`: `\u003cfield\u003e already exists`.\n\n### 3. Comment Management\n\n#### Post a Comment\n\n- **POST** `/auth/users/{userid}/comment`\n  - **Summary**: Post a comment to a specific thread.\n  - **Parameters**:\n    - `userid` (path, required): The ID of the user.\n    - `threadid` (query, required): The ID of the thread.\n  - **Responses**:\n    - `201`: Comment posted successfully.\n    - `401`: Unauthorized.\n    - `400`: Bad request.\n\n#### Delete a Comment\n\n- **DELETE** `/auth/comments/{commentid}`\n  - **Summary**: Delete a specific comment.\n  - **Parameters**:\n    - `commentid` (path, required): The ID of the comment.\n    - `threadid` (query, required): The ID of the thread.\n  - **Responses**:\n    - `204`: Comment deleted successfully.\n    - `404`: Comment not found.\n    - `401`: Unauthorized.\n    - `400`: Bad request.\n\n### 4. Admin Management\n\n#### Get List of Users\n\n- **GET** `/admin/users`\n  - **Summary**: Retrieve the list of users.\n  - **Responses**:\n    - `200`: Users retrieved successfully.\n    - `401`: Unauthorized.\n\n#### Grant Admin Privileges\n\n- **POST** `/admin/users/{userid}/sudo`\n  - **Summary**: Grant admin privileges to a user.\n  - **Parameters**:\n    - `userid` (path, required): The ID of the user.\n  - **Responses**:\n    - `200`: Admin privileges granted.\n    - `401`: Unauthorized.\n    - `404`: User not found.\n    - `500`: Failed to grant admin privileges.\n\n#### Revoke Admin Privileges\n\n- **POST** `/admin/users/{userid}/sudo/revoke`\n  - **Summary**: Revoke admin privileges from a user.\n  - **Parameters**:\n    - `userid` (path, required): The ID of the user.\n  - **Responses**:\n    - `200`: Admin privileges revoked.\n    - `401`: Unauthorized.\n    - `404`: User not found.\n    - `500`: Failed to revoke admin privileges.\n\n### 5. Thread Management\n\n#### Retrieve All Thread IDs\n\n- **GET** `/admin/threads`\n  - **Summary**: Retrieve all thread IDs.\n  - **Responses**:\n    - `200`: Threads retrieved successfully.\n    - `401`: Unauthorized.\n\n#### Create a New Thread\n\n- **POST** `/admin/threads/new`\n  - **Summary**: Create a new thread.\n  - **Parameters**:\n    - `title` (query, required): The title of the thread.\n  - **Responses**:\n    - `201`: Thread created successfully.\n    - `400`: Thread title not set.\n    - `409`: Thread title already exists.\n    - `401`: Unauthorized.\n\n#### Delete a Thread\n\n- **DELETE** `/admin/threads/{threadid}`\n  - **Summary**: Delete a specific thread.\n  - **Parameters**:\n    - `threadid` (path, required): The ID of the thread.\n  - **Responses**:\n    - `204`: Thread deleted successfully.\n    - `400`: Unable to parse request.\n    - `401`: Unauthorized.\n    - `404`: Thread not found.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkdesp73%2Fgotalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkdesp73%2Fgotalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkdesp73%2Fgotalk/lists"}