- Made a selection for the coupon selected, also added no coupon found when coupon is not there - Added Masila view in more section - Added Play trailer from Manila in more section - Gave other connectivity
147 lines
5.5 KiB
Swift
147 lines
5.5 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"
|
|
|
|
static let appUrl = "https://apps.apple.com/in/app/woka/id6465305185"
|
|
}
|
|
|
|
struct StaticURLs{
|
|
// var masilaUrl = "https://content.jwplatform.com/videos/Iygt11AD-Ysj2G4DQ.mp4"
|
|
static let masilaUrl = "https://cdn.jwplayer.com/manifests/Iygt11AD.m3u8"
|
|
}
|
|
|
|
struct Auth {
|
|
static let check_exist_email = makeURL(path: "check_exist_email")
|
|
|
|
/*
|
|
Login User
|
|
*/
|
|
static let login = makeURL(path: "login")
|
|
static let login_proceed = makeURL(path: "login_proceed")
|
|
static let guest_login = makeURL(path: "guest_login")
|
|
|
|
|
|
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")
|
|
|
|
/*
|
|
UserData
|
|
*/
|
|
static let get_user_data = makeURL(path: "get_user_data")
|
|
}
|
|
|
|
struct SideBarNav{
|
|
static let faq_listing = makeURL(path: "faq_listing")
|
|
static let user_queries_store = makeURL(path: "user_queries_store")
|
|
static let guest_queries_store = makeURL(path: "guest_queries_store")
|
|
static let update_profile = makeURL(path: "update_profile")
|
|
static let user_logout = makeURL(path: "user_logout")
|
|
static let user_deactivate_account = makeURL(path: "user_deactivate_account")
|
|
}
|
|
|
|
struct Home{
|
|
static let blogs = makeURL(path: "blogs")
|
|
static let song_listing = makeURL(path: "song_listing")
|
|
static let get_user_notifications = makeURL(path: "get_user_notifications")
|
|
static let favourite_listing = makeURL(path: "favourite_listing")
|
|
|
|
//Post Like Unlike
|
|
static let post_like = makeURL(path: "post_like")
|
|
static let post_unlike = makeURL(path: "post_unlike")
|
|
|
|
// Favourite
|
|
static let favourite_remove = makeURL(path: "favourite_remove")
|
|
static let favourite_add = makeURL(path: "favourite_add")
|
|
}
|
|
|
|
struct WebSeries{
|
|
static let continue_watching = makeURL(path: "continue_watching")
|
|
static let watch_show_listing = makeURL(path: "watch_show_listing")
|
|
static let category_listing = makeURL(path: "category_listing")
|
|
static let season_listing = makeURL(path: "season_listing")
|
|
static let episode_listing = makeURL(path: "episode_listing")
|
|
static let teaser_listing = makeURL(path: "teaser_listing")
|
|
}
|
|
|
|
struct AudioBooks{
|
|
static let listen_audio_listing = makeURL(path: "listen_audio_listing")
|
|
}
|
|
|
|
struct Games{
|
|
static let game_listing = makeURL(path: "game_listing")
|
|
static let get_token_to_auth_player = makeURL(path: "get_token_to_auth_player")
|
|
}
|
|
|
|
struct Karaoke{
|
|
static let sing_karaoke_listing = makeURL(path: "sing_karaoke_listing")
|
|
}
|
|
|
|
struct Shop{
|
|
static let super_category_listing = makeURL(path: "super_category_listing")
|
|
static let category_listing = makeURL(path: "category_listing")
|
|
static let sub_category_listing = makeURL(path: "sub_category_listing")
|
|
static let shop_product_listing = makeURL(path: "shop_product_listing")
|
|
}
|
|
|
|
struct Cart{
|
|
static let cart_listing = makeURL(path: "cart_listing")
|
|
static let remove_cart = makeURL(path: "remove_cart")
|
|
static let coupon_listing = makeURL(path: "coupon_listing")
|
|
static let applied_coupon_discount = makeURL(path: "applied_coupon_discount")
|
|
static let create_new_order = makeURL(path: "create_new_order")
|
|
}
|
|
|
|
// Other endpoint categories...
|
|
struct Links {
|
|
static let privacyPolicy = "https://www.wokaland.com/privacy-policy/"
|
|
static let termsAndCondition = "https://www.wokaland.com/terms/"
|
|
// 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)
|
|
}
|
|
}
|