- Added api for show listing , made data model, updated the dropdown - Added api for category, made data model - Made the dynamic height tableview to show all the shows - On fav add remove , will refresh the mylist screen - Added default load on hindi - On category selection change, updating the show list data - Handled the fav category id as int, string , string seeprated with “,” - Modifying my list with bookmark id with above
110 lines
3.6 KiB
Swift
110 lines
3.6 KiB
Swift
//
|
|
// ContinueWatchingDM.swift
|
|
// WOKA
|
|
//
|
|
// Created by MacBook Pro on 18/06/24.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
// MARK: - ContinueWatchingDM
|
|
struct ContinueWatchingDM: Codable {
|
|
let result: [ResultData]?
|
|
let totalRecords: Int?
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case result
|
|
case totalRecords = "total_records"
|
|
}
|
|
|
|
// MARK: - Result
|
|
struct ResultData: Codable {
|
|
let id, watchShowsMasterID, seasonMasterID, episodeNumber: Int?
|
|
let episodeTitle, episodeDescription: String?
|
|
let thumbnailPath: String?
|
|
let thumbnailImgURL: String?
|
|
let episodeURL: String?
|
|
let languageMasterID: Int?
|
|
let tagsKeyword, episodeDuration, releaseDate: String?
|
|
let contentMoreDetails: [ContentMoreDetail]?
|
|
let showDataCount: ShowDataCount?
|
|
let userVideoView: [UserVideoView]?
|
|
let seasonNumber: String?
|
|
let markAsFavourite, isLiked: Bool?
|
|
let viewsCount, likesCount, bookmarkCount: Int?
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case id
|
|
case watchShowsMasterID = "watch_shows_master_id"
|
|
case seasonMasterID = "season_master_id"
|
|
case episodeNumber = "episode_number"
|
|
case episodeTitle = "episode_title"
|
|
case episodeDescription = "episode_description"
|
|
case thumbnailPath = "thumbnail_path"
|
|
case thumbnailImgURL = "thumbnail_img_url"
|
|
case episodeURL = "episode_url"
|
|
case languageMasterID = "language_master_id"
|
|
case tagsKeyword = "tags_keyword"
|
|
case episodeDuration = "episode_duration"
|
|
case releaseDate = "release_date"
|
|
case contentMoreDetails = "content_more_details"
|
|
case showDataCount = "show_data_count"
|
|
case userVideoView = "user_video_view"
|
|
case seasonNumber = "season_number"
|
|
case markAsFavourite = "mark_as_favourite"
|
|
case isLiked = "is_liked"
|
|
case viewsCount = "views_count"
|
|
case likesCount = "likes_count"
|
|
case bookmarkCount = "bookmark_count"
|
|
}
|
|
}
|
|
|
|
// MARK: - ContentMoreDetail
|
|
struct ContentMoreDetail: Codable {
|
|
let id, contentID, postType, languageMasterID: Int?
|
|
let title, description, tagsKeywords: String?
|
|
let contentHDURL, contentSDURL: String?
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case id
|
|
case contentID = "content_id"
|
|
case postType = "post_type"
|
|
case languageMasterID = "language_master_id"
|
|
case title, description
|
|
case tagsKeywords = "tags_keywords"
|
|
case contentHDURL = "content_hd_url"
|
|
case contentSDURL = "content_sd_url"
|
|
}
|
|
}
|
|
|
|
// MARK: - ShowDataCount
|
|
struct ShowDataCount: Codable {
|
|
let id, totalSeasons, totalEpisodes: Int?
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case id
|
|
case totalSeasons = "total_seasons"
|
|
case totalEpisodes = "total_episodes"
|
|
}
|
|
}
|
|
|
|
// MARK: - UserVideoView
|
|
struct UserVideoView: Codable {
|
|
let id, userID, postID, postType: Int?
|
|
let totalWatchedDuration: String?
|
|
let lastWatchedLeft: String?
|
|
let categoryID: Int?
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case id
|
|
case userID = "user_id"
|
|
case postID = "post_id"
|
|
case postType = "post_type"
|
|
case totalWatchedDuration = "total_watched_duration"
|
|
case lastWatchedLeft = "last_watched_left"
|
|
case categoryID = "category_id"
|
|
}
|
|
}
|
|
|
|
}
|