init commit,
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// GetPostsResponse.swift
|
||||
// watchapp Watch App
|
||||
//
|
||||
// Created by Alexander Harding on 8/2/23.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct GetPostsResponse: Codable {
|
||||
let posts: [PostView]
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// Post.swift
|
||||
// watchapp Watch App
|
||||
//
|
||||
// Created by Alexander Harding on 8/2/23.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct Post: Codable, Identifiable {
|
||||
let id: Int
|
||||
let name: String
|
||||
let url: String?
|
||||
let body: String?
|
||||
let thumbnailUrl: String?
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// PostView.swift
|
||||
// watchapp Watch App
|
||||
//
|
||||
// Created by Alexander Harding on 8/2/23.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct PostView: Codable, Identifiable {
|
||||
var id: Int {
|
||||
post.id
|
||||
}
|
||||
|
||||
let post: Post
|
||||
let saved: Bool
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// SavePost.swift
|
||||
// watchapp Watch App
|
||||
//
|
||||
// Created by Alexander Harding on 8/2/23.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct SavePost: Codable {
|
||||
let post_id: Int
|
||||
let save: Bool
|
||||
let auth: String
|
||||
}
|
Reference in New Issue
Block a user