Skip to content

Instantly share code, notes, and snippets.

@trupin
Last active September 24, 2018 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trupin/e60ded85bc01269842bdbca6529da2d8 to your computer and use it in GitHub Desktop.
Save trupin/e60ded85bc01269842bdbca6529da2d8 to your computer and use it in GitHub Desktop.
@objc final class ReviewPage: NSObject {
let properties: Page<Review.Properties>
init(_ properties: Page<Review.Properties>) {
self.properties = properties
}
@objc var page: UInt {
return properties.page
}
@objc var totalResults: UInt {
return properties.total_results
}
@objc var totalPages: UInt {
return properties.total_pages
}
@objc public var results: [Review] {
return properties.results.map { Review($0) }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment