Files
Woka_Native_iOS/WOKA/Network Adapter/APIEndPoints.swift
Bilal ecfa31b57f - Removed the pod for center collection view. Now instead of library i have created a custom flowlayout
- Added the Forgot password otp send api.
- Done the error handling and navigation for the same.
- Added api for password updated.
- Added necessary Checks for the password.
- Fixed the versioning issue of the centered flow layout. Also fixed the errors, for the complex calculations , splitted the calculations to avoid crash.
2024-05-10 20:43:57 +05:30

67 lines
2.3 KiB
Swift

//
// APIEndPoints.swift
// WOKA
//
// Created by MacBook Pro on 06/05/24.
//
import Foundation
// enum to check envirnments
enum EnvironmentCheck{
case staging
case production
}
struct APIEndPoints {
// Private init to prevent external initialization
private init() {}
struct BaseURL {
static let staging = "https://wokaland.com/admin/api/"
static let production = "https://simplitend.com"
}
struct Auth {
static let check_exist_email = makeURL(path: "check_exist_email")
static let login = makeURL(path: "login")
static let login_proceed = makeURL(path: "login_proceed")
static let user_email_verification = makeURL(path: "user_email_verification")
static let validate_otp = makeURL(path: "validate_otp")
static let interest_topic_listing = makeURL(path: "interest_topic_listing")
static let check_exist_username = makeURL(path: "check_exist_username")
static let avatar_listing = makeURL(path: "avatar_listing")
static let child_registration = makeURL(path: "child_registration")
static let get_linked_child = makeURL(path: "get_linked_child")
/*
Password forgot api's
*/
static let forgot_password_send_otp = makeURL(path: "forgot_password_send_otp")
static let forgot_password_verify_otp = makeURL(path: "forgot_password_verify_otp")
static let update_password = makeURL(path: "update_password")
}
// Other endpoint categories...
struct Links {
static let privacyPolicy = "https://www.simplitend.com/privacy-policy"
static let termsAndCondition = "https://www.simplitend.com/terms-and-conditions"
// Other links...
}
// Helper method to construct full URL from base URL and path
private static func makeURL(path: String) -> URL {
guard let baseURL = baseURLForCurrentEnvironment() else {
fatalError("Base URL not configured for current environment")
}
return baseURL.appendingPathComponent(path)
}
// Helper method to get base URL based on current environment
private static func baseURLForCurrentEnvironment() -> URL? {
// Determine environment (e.g., staging, production) and return appropriate base URL
return URL(string: BaseURL.staging)
}
}