New feature: Users can view, submit, and interact with event reviews. Components added: - ReviewModel, ReviewStatsModel, ReviewListResponse (models) - ReviewService with getReviews, submitReview, markHelpful, flagReview - StarRatingInput (interactive 5-star picker with labels) - StarDisplay (read-only fractional star display) - ReviewSummary (average rating + distribution bars) - ReviewForm (star picker + comment field + submit/update) - ReviewCard (avatar, timestamp, expandable comment, helpful/flag) - ReviewSection (main container with pagination and state mgmt) Integration: - Added to LearnMoreScreen (both mobile and desktop layouts) - Review API endpoints point to app.eventifyplus.com Node.js backend - EventModel updated with averageRating/reviewCount fields Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
46 lines
2.4 KiB
Dart
46 lines
2.4 KiB
Dart
// lib/core/api/api_endpoints.dart
|
|
class ApiEndpoints {
|
|
// Change this to your desired backend base URL (local or UAT)
|
|
// For local Django dev use: "http://127.0.0.1:8000/api"
|
|
// For UAT: "https://uat.eventifyplus.com/api"
|
|
static const String baseUrl = "https://em.eventifyplus.com/api";
|
|
|
|
/// Base URL for media files (images, icons uploaded via Django admin).
|
|
/// Relative paths like `/media/...` are resolved against this.
|
|
static const String mediaBaseUrl = "https://em.eventifyplus.com";
|
|
|
|
// Auth
|
|
static const String register = "$baseUrl/user/register/";
|
|
static const String login = "$baseUrl/user/login/";
|
|
static const String logout = "$baseUrl/user/logout/";
|
|
static const String status = "$baseUrl/user/status/";
|
|
|
|
// Events
|
|
static const String eventTypes = "$baseUrl/events/type-list/"; // list of event types
|
|
static const String eventsByPincode = "$baseUrl/events/pincode-events/"; // pincode-events
|
|
static const String eventDetails = "$baseUrl/events/event-details/"; // event-details
|
|
static const String eventImages = "$baseUrl/events/event-images/"; // event-images
|
|
static const String eventsByCategory = "$baseUrl/events/events-by-category/";
|
|
static const String eventsByMonth = "$baseUrl/events/events-by-month-year/";
|
|
|
|
// Bookings
|
|
// static const String bookEvent = "$baseUrl/events/book-event/";
|
|
// static const String userSuccessBookings = "$baseUrl/events/event/user-success-bookings/";
|
|
// static const String userCancelledBookings = "$baseUrl/events/event/user-cancelled-bookings/";
|
|
|
|
// Reviews (served by Node.js backend via app.eventifyplus.com)
|
|
static const String _reviewBase = "https://app.eventifyplus.com/api/reviews";
|
|
static const String reviewSubmit = "$_reviewBase/submit";
|
|
static const String reviewList = "$_reviewBase/list";
|
|
static const String reviewHelpful = "$_reviewBase/helpful";
|
|
static const String reviewFlag = "$_reviewBase/flag";
|
|
|
|
// Gamification / Contributor Module (TechDocs v2)
|
|
static const String gamificationProfile = "$baseUrl/v1/user/gamification-profile/";
|
|
static const String leaderboard = "$baseUrl/v1/leaderboard/";
|
|
static const String shopItems = "$baseUrl/v1/shop/items/";
|
|
static const String shopRedeem = "$baseUrl/v1/shop/redeem/";
|
|
static const String contributeSubmit = "$baseUrl/v1/contributions/submit/";
|
|
static const String gradeContribution = "$baseUrl/v1/admin/contributions/"; // append {id}/grade/
|
|
}
|