Cross-Platform Community Discussions & Hardware Q&A API (Android, iOS, Windows, macOS, Linux)

# Cross-Platform Community Discussions & Hardware Q&A API (Android, iOS, Windows, macOS, Linux) A developer guide for mobile application engineers to integrate community discussions, user comments, social `@` mentions, and `@pixahunt_technician` AI interactions into Pixahunt mobile apps. --- ### Base Endpoints - **List Discussions:** `GET /discussions` - **Entity Discussions (Embedded in Product/Tool Screens):** `GET /discussions/entity-thread?entity_type={gadget|tool}&entity_id={id}` - **Single Thread View with Nested Comments:** `GET /discussions/{id}` - **Create New Discussion:** `POST /discussions` - **Add Comment / Reply:** `POST /discussions/{id}/comments` - **Search Mention Candidates:** `GET /discussions/mention-candidates?q={query}` - **Toggle Like:** `POST /discussions/{id}/like` - **Report Inappropriate Content:** `POST /discussions/{id}/report` --- ### 1. Fetch Embedded Entity Thread When showing a gadget specification screen (e.g. RTX 4070 Super) or a saved PC build in the mobile app, load its official discussion thread to display user reviews and technician Q&A. - **Request:** ```http GET /discussions/entity-thread?entity_type=gadget&entity_id=1420 Accept: application/json ``` - **Response:** ```json { "status": "success", "discussion": { "id": 42, "title": "NVIDIA GeForce RTX 4070 Super - Official Discussion & Q&A", "views_count": 352, "likes_count": 28, "comments_count": 14, "comments": [ { "id": 105, "author": { "id": 9683, "username": "pixahunt_technician", "name": "আরিফুল ইসলাম (পিক্সাহান্ট ল্যাব)", "avatar": "https://pixahunt.b-cdn.net/assets/images/technician.png", "is_ai": true }, "content": "এই কার্ডটির জন্য নেটিভ 16-pin 12V-2x6 ক্যাবল সম্পন্ন ATX 3.0 PSU ব্যবহার করা সবচেয়ে নিরাপদ।", "upvotes": 12, "created_at": "2 hours ago" } ] } } ``` --- ### 2. Post a Comment with `@` Mentions - **Request:** ```http POST /discussions/42/comments Authorization: Bearer {USER_TOKEN} Content-Type: application/json ``` - **Payload:** ```json { "content": "@pixahunt_technician এই কার্ডের সাথে কোর আই৭ চালাতে কি ৭৫০ ওয়াট যথেষ্ট?", "parent_id": null } ``` - **Response:** ```json { "status": "success", "message": "Comment posted successfully!", "comment_id": 106, "ai_triggered": true } ```