Created
January 18, 2020 00:17
-
-
Save ycui1/6c533f9bd8d97b0fb4e328f5e2de6b0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let articleURLs = [ | |
"https://medium.com/better-programming/10-awesome-javascript-libraries-for-front-end-developers-in-2020-d450b9ed66d1", | |
"https://medium.com/better-programming/d3-responsive-and-dynamic-visualizations-for-data-and-other-easy-recipes-68e37b451822", | |
"https://medium.com/better-programming/build-reusable-swiftui-component-libraries-with-the-swift-package-manager-23343681a8f3", | |
"https://medium.com/better-programming/my-one-tip-to-be-effective-at-learning-a-new-programming-language-45789bacf730", | |
"https://medium.com/better-programming/build-a-react-app-using-aws-amplify-in-simple-steps-part-3-12c1b7746450", | |
"https://medium.com/better-programming/convert-json-to-xlsx-file-in-javascript-e7611a975916", | |
"https://medium.com/better-programming/how-to-set-up-a-local-dynamodb-in-a-docker-container-and-perform-the-basic-putitem-getitem-38958237b968", | |
"https://medium.com/better-programming/introduction-to-waitress-a-wsgi-server-for-python-2-and-3-c77e20cb292b", | |
"https://medium.com/better-programming/check-swift-array-is-empty-f15e63bf1026", | |
"https://medium.com/better-programming/5-important-learning-strategies-for-programmers-cdffa94a448d" | |
] | |
struct Article: Identifiable { | |
let id: String | |
var title: String = "Article Title Placeholder" | |
var subtitle: String? | |
var link: String? = "Link to Article" | |
var imageLink: String? | |
var imageData: Data? | |
static func sampleArticles() -> [Article] { | |
var articles = [Article]() | |
for url in articleURLs { | |
articles.append(Article(id: url)) | |
} | |
return articles | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment