jalsnipe / google-news-reader Goto Github PK
View Code? Open in Web Editor NEWGoogle News RSS Reader in Swift 2.0
License: MIT License
Google News RSS Reader in Swift 2.0
License: MIT License
The first step of any TDD project is to write the test cases. I figured the best place to start with Unit Tests should be the Model and Network manager.
Network Manager
func fetchAllArticles()
NSData
representation of the RSS Feed.func parseRawArticle()
fetchAllArticles()
and begin to parse the data into an Article
object using NSXMLParser
.Article
model
Article
as part of a Core Data context (main or side thread for work), and store the completed article, or fail on error.Article
objects from Core Data (or use an NSFetchedResultsController
to automatically update the table view.[More TODO]
Prototype:
<item>
<title>Title</title>
<link>URL</link>
<guid isPermaLink="false">[sometag]</guid>
<category>Category</category>
<pubDate>[Date]</pubDate>
<description>[HTML table]</description>
</item>
Example:
<item>
<title>President Barack Obama Makes Birth Certificate Joke on Kenya Trip - NBCNews.com</title>
<link>http://news.google.com/news/url?sa=t&fd=R&ct2=us&usg=AFQjCNGohCh57MwTVufdRZDxeu5OASDb0w&clid=c3a7d30bb8a4878e06b80cf16b898331&cid=52778905004468&ei=LSa0VaCZAoGB3gGNxoHYDQ&url=http://www.nbcnews.com/politics/barack-obama/obama-makes-birth-certificate-joke-kenya-trip-n398381</link>
<guid isPermaLink="false">tag:news.google.com,2005:cluster=52778905004468</guid>
<category>Top Stories</category>
<pubDate>Sat, 25 Jul 2015 21:32:00 GMT</pubDate>
<description><table border="0" cellpadding="2" cellspacing="7" style="vertical-align:top;"><tr><td width="80" align="center" valign="top"><font style="font-size:85%;font-family:arial,sans-serif"><a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;ct2=us&amp;usg=AFQjCNGohCh57MwTVufdRZDxeu5OASDb0w&amp;clid=c3a7d30bb8a4878e06b80cf16b898331&amp;cid=52778905004468&amp;ei=LSa0VaCZAoGB3gGNxoHYDQ&amp;url=http://www.nbcnews.com/politics/barack-obama/obama-makes-birth-certificate-joke-kenya-trip-n398381"><img src="//t1.gstatic.com/images?q=tbn:ANd9GcTECW1n6u9hKEN39yJlSihz_--TJ4LmRFjGCOg97tzZakEgBvNzuF9hSvZ3cDpn0AttU4CYFrM" alt="" border="1" width="80" height="80"><br><font size="-2">NBCNews.com</font></a></font></td><td valign="top" class="j"><font style="font-size:85%;font-family:arial,sans-serif"><br><div style="padding-top:0.8em;"><img alt="" height="1" width="1"></div><div class="lh"><a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;ct2=us&amp;usg=AFQjCNGohCh57MwTVufdRZDxeu5OASDb0w&amp;clid=c3a7d30bb8a4878e06b80cf16b898331&amp;cid=52778905004468&amp;ei=LSa0VaCZAoGB3gGNxoHYDQ&amp;url=http://www.nbcnews.com/politics/barack-obama/obama-makes-birth-certificate-joke-kenya-trip-n398381"><b>President Barack Obama Makes Birth Certificate Joke on Kenya Trip</b></a><br><font size="-1"><b><font color="#6f6f6f">NBCNews.com</font></b></font><br><font size="-1">If you can&#39;t beat members of the &quot;birther&quot; movement, join &#39;em. That&#39;s the approach President Barack Obama took on Saturday night in Kenya, his father&#39;s homeland, when he made a wisecrack about his birthplace — which suspicious critics have harped on <b>...</b></font><br><font size="-1"><a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;ct2=us&amp;usg=AFQjCNEO4V8Nci6yqSLKp0MNYpgoCJcevw&amp;clid=c3a7d30bb8a4878e06b80cf16b898331&amp;cid=52778905004468&amp;ei=LSa0VaCZAoGB3gGNxoHYDQ&amp;url=http://www.haaretz.com/news/world/1.667808">In first presidential visit to Kenya, Obama chides Nairobi on gay rights <b>...</b></a><font size="-1" color="#6f6f6f"><nobr>Haaretz</nobr></font></font><br><font size="-1"><a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;ct2=us&amp;usg=AFQjCNFzOwi_7xeH7M2f5nEtz_Y3liedQQ&amp;clid=c3a7d30bb8a4878e06b80cf16b898331&amp;cid=52778905004468&amp;ei=LSa0VaCZAoGB3gGNxoHYDQ&amp;url=http://www.nytimes.com/2015/07/26/world/africa/in-kenya-obama-hails-africas-growth-and-potential.html">Obama in Kenya: An Upbeat Tone, but Notes of Discord, Too</a><font size="-1" color="#6f6f6f"><nobr>New York Times</nobr></font></font><br><font size="-1"><a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;ct2=us&amp;usg=AFQjCNHJwVR6vBEdWunKKX8LAqJGetN8Pw&amp;clid=c3a7d30bb8a4878e06b80cf16b898331&amp;cid=52778905004468&amp;ei=LSa0VaCZAoGB3gGNxoHYDQ&amp;url=http://www.cnn.com/2015/07/25/politics/obama-kenyatta-kenya-fathers/">Obama, Kenyatta&#39;s fathers were political adversaries</a><font size="-1" color="#6f6f6f"><nobr>CNN</nobr></font></font><br><font size="-1" class="p"><a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;ct2=us&amp;usg=AFQjCNEhoN0Qb07sfOPBZ3b5RgzCvK01ow&amp;clid=c3a7d30bb8a4878e06b80cf16b898331&amp;cid=52778905004468&amp;ei=LSa0VaCZAoGB3gGNxoHYDQ&amp;url=http://www.theguardian.com/commentisfree/2015/jul/26/barack-obama-potential-legacy"><nobr>The Guardian</nobr></a>&nbsp;-<a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;ct2=us&amp;usg=AFQjCNEtXndHeYi-iStIydo4nNfoDPXikQ&amp;clid=c3a7d30bb8a4878e06b80cf16b898331&amp;cid=52778905004468&amp;ei=LSa0VaCZAoGB3gGNxoHYDQ&amp;url=http://www.washingtonpost.com/blogs/post-politics/wp/2015/07/25/obama-africa-is-on-the-move/"><nobr>Washington Post (blog)</nobr></a>&nbsp;-<a href="http://news.google.com/news/url?sa=t&amp;fd=R&amp;ct2=us&amp;usg=AFQjCNGmcY3FOKQzksMioRwdpJHQ-_PMzw&amp;clid=c3a7d30bb8a4878e06b80cf16b898331&amp;cid=52778905004468&amp;ei=LSa0VaCZAoGB3gGNxoHYDQ&amp;url=http://timesofindia.indiatimes.com/world/rest-of-world/In-Kenya-Obama-blends-blunt-messages-with-warm-reflections/articleshow/48221045.cms"><nobr>Times of India</nobr></a></font><br><font class="p" size="-1"><a class="p" href="http://news.google.com/news/more?ncl=d8MIO_8-FnWisUMUNX1BfIYTR4aVM&amp;authuser=0&amp;ned=us&amp;topic=h"><nobr><b>all 4,315 news articles&nbsp;&raquo;</b></nobr></a></font></div></font></td></tr></table></description>
</item>
I should probably update this to Swift 3.0.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.