SwiftDailyAPI Versions Save

A Swift API framework for ZhiHu's Daily News.

2.0.1

8 years ago
  • Use CocoaPods as dependency manager
  • Drop support for Carthage

Sad, you cannot support both of them together somehow.

2.0.0

8 years ago
  • Update to Swift 2
  • All tests pass!

NB Not a single change related to Quick and Nimble. Big fat claps :clap::clap::clap: for the Quick team for creating such an un-breaking API!

1.1.3

8 years ago

Decoding happens in another queue other than NSOperationQueue.mainQueue(). No more UI blocking.

Changed

  • Async decoding d95a9bf
  • Make the date in DateIndex public b3ea74d

Fixed

  • Maybe I should stop using fit, cant remember to change it back 68bf7bd

1.1.2

8 years ago

Fix Int subscript for TimelineCollection to play nice with TabliView.

Basically it means the nth item in a TimelineCollection should be the nth item going backward from the end of the collection, i.e. timeline[n] == timeline[timeline.endIndex - 1 - n]. This plays well with how UITableView orders the sections in itself.

--    Top    --
-- Section 0 -- ... -- timeline[endIndex - 1] --
-- Section 1 -- ... -- timeline[endIndex - 2] --
-- Section 2 -- ... -- timeline[endIndex - 3] --
       .
       .
       .

1.1.1

8 years ago

TimelineCollection gets count, indices, isEmpty, filter, map for free.

Added

  • TimelineCollection confirms to CollectionType b172342

1.1.0

8 years ago

Mainly added the DailyInMemoryStore and TimelineCollection for it. And updated to Xcode 7.0 and Swift 2.0. YEAH!!!!1!

Added

  • Add NSDate.daysAfter 557f070

DailyInMemoryStore

  • Use TimelineCollection to store dailies in DailyInMemoryStore f1a6ef1

TimelineCollection

  • Add TimelineCollection and DateIndex f5d24b7
  • Add spec for TimelineCollection aa41da5
  • DateIndex defaults to init with today's date 09ed7d9

Changed

  • Handlers in DailyAPI now take non-nil values only 6d174eb

Xcode 7.0 and Swift 2.0

  • Xcode 7 + Swift 2 = AWESOME! (testable) f635059
  • Update for Swift 2.0 YEAH!!!!1! 5014eb4

Fixed

  • Correct NSDate.daysBefore to return earlier dates. 1bb1559
  • Fix the path for DailyAPI.daily(forDate:) 6fcf6b4

P.S.

The 1 in YEAH!!!!1! at the beginning is intended.

1.0.0

8 years ago

Added

API

  • DailyAPI.newsExtra(newsId:) 1d967a2
  • shortComments, longComments, comments in DailyAPI 4ac599d

Model

  • Decodable Comment a5b3931

Misc

  • Note: completionHandlers will be called on NSThread.mainThread() e68a21e
  • toNSDate method to parse date in Daily 4fe1796
  • Performance test with real data 52bf5fc

Improved

  • Add final for better performance c528bcf
  • Type converting/decoing is done by extension to Argo 4fe1796, a65ed13
  • Add documentation for functions in DailyAPI 3019b49
  • More detailed example code in README.md 329dfdc

Changed

  • Rename DailyNews to Daily 596f48f
  • Move dateFormat into DailyConstants bcdc817
  • Mark all create functions as private b41e459

Highlights

  • The magical power of Generics and Emacs e9c3bd8

0.3.1

8 years ago

Extracted main body of the following methods into a generic function DailyAPI.request(URLRequest:, completionHandler:).

  • DailyAPI.latestDaily
  • DailyAPI.dailyNews
  • DailyAPI.news

0.3

8 years ago

Added

  • DailyAPI.news
  • Decodable News model

0.1

8 years ago

Basic setup of the project and one main functionality

Added

  • DailyAPI.latestDaily
  • Decodable Models
    • DailyNews
    • LatestDailyNews
    • NewsMeta
    • TopNewsMeta