Files
afterwork/lib/core/constants/urls.dart
2024-11-17 23:00:18 +00:00

33 lines
2.2 KiB
Dart

class Urls {
static const String baseUrl = 'http://192.168.1.16:8080';
// Authentication and Users Endpoints
static const String authenticateUser = '$baseUrl/users/authenticate';
static const String createUser = '$baseUrl/users';
static const String getUserById = '$baseUrl/users'; // Append '/{id}' dynamically
static const String deleteUser = '$baseUrl/users'; // Append '/{id}' dynamically
static const String updateUserProfileImage = '$baseUrl/users'; // Append '/{id}/profile-image' dynamically
// Events Endpoints
static const String createEvent = '$baseUrl/events';
static const String getEventById = '$baseUrl/events'; // Append '/{id}' dynamically
static const String deleteEvent = '$baseUrl/events'; // Append '/{id}' dynamically
static const String getEventsAfterDate = '$baseUrl/events/after-date';
static const String addParticipant = '$baseUrl/events'; // Append '/{id}/participants' dynamically
static const String removeParticipant = '$baseUrl/events'; // Append '/{id}/participants/{userId}' dynamically
static const String getNumberOfParticipants = '$baseUrl/events'; // Append '/{id}/participants/count' dynamically
static const String closeEvent = '$baseUrl/events'; // Append '/{id}/close' dynamically
static const String reopenEvent = '$baseUrl/events'; // Append '/{id}/reopen' dynamically
static const String updateEvent = '$baseUrl/events'; // Append '/{id}' dynamically
static const String updateEventImage = '$baseUrl/events'; // Append '/{id}/image' dynamically
static const String getAllEvents = '$baseUrl/events';
static const String getEventsByCategory = '$baseUrl/events/category'; // Append '/{category}' dynamically
static const String updateEventStatus = '$baseUrl/events'; // Append '/{id}/status' dynamically
static const String searchEvents = '$baseUrl/events/search'; // Use query parameter for 'keyword'
static const String getEventsByUser = '$baseUrl/events/user'; // Append '/{userId}' dynamically
static const String getEventsByStatus = '$baseUrl/events/status'; // Append '/{status}' dynamically
static const String getEventsBetweenDates = '$baseUrl/events/between-dates'; // Use query parameters for startDate and endDate
// Other URLs can be added here as the project expands
}