Files
Woka_Native_iOS/WOKA/Theme/Model/BlogDM.swift
BilalKhanWDI 5a7750d012 - Completed My oders. Rest will be completed when shop module is finished.
- Internet issue
- Added api to get blogs, with data model decoding, inflating the collection view
- Added api to get the songs, with data model decoding , inflated tableview with dynamic height
- Added inline player for song list
2024-06-10 19:45:36 +05:30

57 lines
1.5 KiB
Swift

//
// BlogDM.swift
// WOKA
//
// Created by MacBook Pro on 10/06/24.
//
import Foundation
// MARK: - Welcome
struct BlogDM: Codable {
let blogs: [Blog]?
let totalRecords: Int?
enum CodingKeys: String, CodingKey {
case blogs
case totalRecords = "total_records"
}
// MARK: - Blog
struct Blog: Codable {
let id: Int?
let title, description: String?
let articleURL: String?
let thumbnailPath: String?
let categoryMasterID: String?
let languageMasterID: Int?
let contentMoreDetails: [ContentMoreDetail]?
enum CodingKeys: String, CodingKey {
case id, title, description
case articleURL = "article_url"
case thumbnailPath = "thumbnail_path"
case categoryMasterID = "category_master_id"
case languageMasterID = "language_master_id"
case contentMoreDetails = "content_more_details"
}
}
// MARK: - ContentMoreDetail
struct ContentMoreDetail: Codable {
let id, contentID, postType: Int?
let title, description: String?
let languageMasterID: Int?
let article: String?
enum CodingKeys: String, CodingKey {
case id
case contentID = "content_id"
case postType = "post_type"
case title, description
case languageMasterID = "language_master_id"
case article
}
}
}